当前位置: 首页>>代码示例>>PHP>>正文


PHP Frame::getIdEntity方法代码示例

本文整理汇总了PHP中Frame::getIdEntity方法的典型用法代码示例。如果您正苦于以下问题:PHP Frame::getIdEntity方法的具体用法?PHP Frame::getIdEntity怎么用?PHP Frame::getIdEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Frame的用法示例。


在下文中一共展示了Frame::getIdEntity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formFrameSemanticType

 public function formFrameSemanticType()
 {
     $model = new Frame($this->data->id);
     $this->data->object = $model->getData();
     $this->data->idEntity = $model->getIdEntity();
     $this->data->form = "formFrameSemanticType";
     $this->data->close = "!\$('#formFrameSemanticType_dialog').dialog('close');";
     $this->data->title = 'Frame: ' . $model->getEntry() . '  [' . $model->getName() . ']';
     $this->render();
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:10,代码来源:FrameController.php

示例2: 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());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:34,代码来源:TemplateRepository.php

示例3: createNew

 public function createNew($data, $inheritsFromBase)
 {
     $relations = $this->getRelations(true);
     $transaction = $this->beginTransaction();
     try {
         $this->save($data);
         if ($data->idTemplate) {
             if ($inheritsFromBase) {
                 $template = new Template($data->idTemplate);
                 $base = $template->getBaseFrame()->asQuery()->getResult();
                 if (count($base)) {
                     $idFrameBase = $base[0]['idFrame'];
                     $frameBase = new Frame($idFrameBase);
                     $relations = $frameBase->getRelations();
                     Base::createEntityRelation($frameBase->getIdEntity(), 'rel_inheritance', $this->getIdEntity());
                 }
             }
         }
         $transaction->commit();
         return $relations;
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:25,代码来源:FrameRepository.php

示例4: createRelationsFromData

 public function createRelationsFromData($fe)
 {
     if ($fe->idFrame) {
         $frame = new Frame($fe->idFrame);
         Base::createEntityRelation($this->getIdEntity(), 'rel_elementof', $frame->getIdEntity());
     }
     $feRelated = new FrameElement();
     if ($fe->coreset) {
         foreach ($fe->coreset as $coreset) {
             $feRelated->getByEntry($coreset->entry);
             Base::createEntityRelation($this->getIdEntity(), 'rel_coreset', $feRelated->getIdEntity());
         }
     }
     if ($fe->excludes) {
         foreach ($fe->excludes as $excludes) {
             $feRelated->getByEntry($excludes->entry);
             Base::createEntityRelation($this->getIdEntity(), 'rel_excludes', $feRelated->getIdEntity());
         }
     }
     if ($fe->requires) {
         foreach ($fe->requires as $requires) {
             $feRelated->getByEntry($requires->entry);
             Base::createEntityRelation($this->getIdEntity(), 'rel_requires', $feRelated->getIdEntity());
         }
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:26,代码来源:FrameElementRepository.php


注:本文中的Frame::getIdEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。