本文整理汇总了PHP中Pimcore\Model\Document\Service::removeTranslation方法的典型用法代码示例。如果您正苦于以下问题:PHP Service::removeTranslation方法的具体用法?PHP Service::removeTranslation怎么用?PHP Service::removeTranslation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pimcore\Model\Document\Service
的用法示例。
在下文中一共展示了Service::removeTranslation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
/**
* Deletes the document
*
* @return void
*/
public function delete()
{
\Pimcore::getEventManager()->trigger("document.preDelete", $this);
// remove childs
if ($this->hasChilds()) {
// delete also unpublished children
$unpublishedStatus = self::doHideUnpublished();
self::setHideUnpublished(false);
foreach ($this->getChilds(true) as $child) {
$child->delete();
}
self::setHideUnpublished($unpublishedStatus);
}
// remove all properties
$this->getDao()->deleteAllProperties();
// remove permissions
$this->getDao()->deleteAllPermissions();
// remove dependencies
$d = $this->getDependencies();
$d->cleanAllForElement($this);
// remove translations
$service = new Document\Service();
$service->removeTranslation($this);
$this->getDao()->delete();
// clear cache
$this->clearDependentCache();
//set object to registry
\Zend_Registry::set("document_" . $this->getId(), null);
\Pimcore::getEventManager()->trigger("document.postDelete", $this);
}