本文整理汇总了PHP中Frame::getEntry方法的典型用法代码示例。如果您正苦于以下问题:PHP Frame::getEntry方法的具体用法?PHP Frame::getEntry怎么用?PHP Frame::getEntry使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Frame
的用法示例。
在下文中一共展示了Frame::getEntry方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createFromFrame
public function createFromFrame($idFrame)
{
$transaction = $this->beginTransaction();
try {
$frame = new Frame($idFrame);
$this->setEntry('tpl_' . strtolower(str_replace('frm_', '', $frame->getEntry())));
$this->save();
Base::createEntityRelation($this->getIdEntity(), 'rel_createdfrom', $frame->getIdEntity());
$fes = $frame->listFE()->asQuery()->asObjectArray();
$fe = new FrameElement();
foreach ($fes as $feData) {
$fe->setPersistent(false);
$feEntry = $this->getEntry() . '_' . $feData->entry;
$entry = new Entry();
$entry->cloneEntry($feData->entry, $feEntry);
$fe->setEntry($feData->entry);
$entity = new Entity();
$entity->setAlias($feEntry);
$entity->setType('FE');
$entity->save();
Base::createEntityRelation($entity->getId(), 'rel_elementof', $this->getIdEntity());
$coreType = new TypeInstance($feData->idCoreType);
Base::createEntityRelation($entity->getId(), 'rel_hastype', $coreType->getIdEntity());
$fe->setIdEntity($entity->getId());
$fe->setActive(true);
$fe->setIdColor($feData->idColor);
$fe->saveModel();
}
$transaction->commit();
} catch (\Exception $e) {
$transaction->rollback();
throw new \Exception($e->getMessage());
}
}
示例2: formNewLU
public function formNewLU()
{
$this->data->idFrame = $this->data->id;
$model = new Frame($this->data->idFrame);
$this->data->frame = 'Frame: ' . $model->getEntry() . ' [' . $model->getName() . ']';
$model = new Lemma();
$this->data->query = Manager::getAppURL('fnbr20', 'structure/frame/gridSearchLemmaData');
$this->data->save = "@fnbr20/structure/frame/newLU|formNewLU";
$this->data->close = "!\$('#formNewLU_dialog').dialog('close');structure.reloadFrame()";
$this->data->title = _M('New LU');
$this->render();
}