本文整理汇总了PHP中Frame::getCriteria方法的典型用法代码示例。如果您正苦于以下问题:PHP Frame::getCriteria方法的具体用法?PHP Frame::getCriteria怎么用?PHP Frame::getCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame::getCriteria方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTitle
public function getTitle($idLanguage = '')
{
$criteria = $this->getCriteria()->select('lu.name luName, name, lu.idLu')->orderBy('name');
Base::relation($criteria, 'lu', 'subcorpus', 'rel_hassubcorpus');
$criteria->where("idSubCorpus = {$this->idSubCorpus}");
$result = $criteria->asQuery()->getResult();
$frame = new Frame();
$criteriaFrame = $frame->getCriteria()->select('frame.entries.name as name');
Base::Relation($criteriaFrame, 'lu', 'frame', 'rel_evokes');
Base::entryLanguage($criteriaFrame);
$criteriaFrame->where("lu.idLu = '{$result[0]['idLu']}'");
$resultFrame = $criteriaFrame->asQuery()->getResult();
return $resultFrame[0]['name'] . '.' . $result[0]['luName'] . ' [' . $result[0]['name'] . ']';
}
示例2: getBaseFrame
public function getBaseFrame()
{
// if template was created from a frame, this frame is the "base frame"
$frame = new Frame();
$criteria = $frame->getCriteria()->select('idFrame, entries.name as name, entries.description as description')->orderBy('entries.name');
Base::relation($criteria, 'template', 'frame', 'rel_createdfrom');
$criteria->where("template.idEntity = {$this->getIdEntity()}");
Base::entryLanguage($criteria);
return $criteria;
}