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


PHP Document::delete方法代码示例

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


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

示例1: delete

 /**
  * @see Document::delete
  * @return void
  */
 public function delete()
 {
     // hardlinks cannot have direct children in "real" world, so we have to empty them before we delete it
     $this->childs = [];
     // check for redirects pointing to this document, and delete them too
     $redirects = new Redirect\Listing();
     $redirects->setCondition("target = ?", $this->getId());
     $redirects->load();
     foreach ($redirects->getRedirects() as $redirect) {
         $redirect->delete();
     }
     parent::delete();
     // we re-enable the children functionality by setting them to NULL, if requested they'll be loaded again
     // -> see $this->getChilds() , doesn't make sense when deleting an item but who knows, ... ;-)
     $this->childs = null;
 }
开发者ID:sfie,项目名称:pimcore,代码行数:20,代码来源:Hardlink.php

示例2: delete

 /**
  * @see Document::delete
  * @return void
  */
 public function delete()
 {
     $versions = $this->getVersions();
     foreach ($versions as $version) {
         $version->delete();
     }
     // remove all tasks
     $this->getDao()->deleteAllTasks();
     parent::delete();
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:14,代码来源:PageSnippet.php


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