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


PHP Entry::deleteEntry方法代码示例

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


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

示例1: delete

 public function delete()
 {
     $transaction = $this->beginTransaction();
     try {
         $idTemplate = $this->getId();
         $idEntity = $this->getIdEntity();
         // remove entry
         $entry = new Entry();
         $entry->deleteEntry($this->getEntry());
         // remove related FEs
         //Base::deleteEntity2Relation($idEntity, 'rel_elementof');
         $fe = new FrameElement();
         $fes = $this->listFEforDeletion()->asQuery()->getResult();
         foreach ($fes as $row) {
             $fe->getById($row['idFrameElement']);
             $fe->delete();
         }
         // remove this template
         parent::delete();
         // remove entity
         $entity = new Entity($idEntity);
         $entity->delete();
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:28,代码来源:TemplateRepository.php

示例2: delete

 public function delete()
 {
     $transaction = $this->beginTransaction();
     try {
         $hasChildren = count($this->listChildren($this->getId())->asQuery()->getResult()) > 0;
         if ($hasChildren) {
             throw new \Exception("Type has subtypes; it can't be removed.");
         } else {
             Base::deleteAllEntityRelation($this->getIdEntity());
             parent::delete();
             $entity = new Entity($this->getIdEntity());
             $entity->delete();
             $entry = new Entry();
             $entry->deleteEntry($this->getEntry());
             $transaction->commit();
         }
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:21,代码来源:SemanticTypeRepository.php

示例3: delete

 public function delete()
 {
     $transaction = $this->beginTransaction();
     try {
         $idEntity = $this->getIdEntity();
         // remove entry
         $entry = new Entry();
         $entry->deleteEntry($this->getEntry());
         // remove frame-relations
         Base::deleteAllEntityRelation($idEntity);
         // remove this frame
         parent::delete();
         // remove entity
         $entity = new Entity($idEntity);
         $entity->delete();
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }
开发者ID:elymatos,项目名称:expressive_fnbr,代码行数:21,代码来源:ConstructionRepository.php

示例4: Entry

<?php

if (!isset($_GET['id']) || $_GET['id'] == "") {
    return include 'controllers/admin/clanky.php';
}
$entryClass = new Entry();
if ($entryClass->deleteEntry($_GET['id'], $profil->getId())) {
    header('location: admin.php?page=clanky');
}
return include 'controllers/admin/clanky.php';
开发者ID:ununik,项目名称:kvhusti,代码行数:10,代码来源:delete_clanek.php


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