deleteContent() public method

Removes the relations, but not the related objects. All subtrees of the assigned nodes of this content objects are removed (recursively).
public deleteContent ( integer $contentId ) : boolean
$contentId integer
return boolean
コード例 #1
0
ファイル: Handler.php プロジェクト: CG77/ezpublish-kernel
 /**
  * Triggers delete operations for $trashItem.
  * If there is no more locations for corresponding content, then it will be deleted as well.
  *
  * @param \eZ\Publish\SPI\Persistence\Content\Location\Trashed $trashItem
  *
  * @return void
  */
 protected function delete(Trashed $trashItem)
 {
     $this->locationGateway->removeElementFromTrash($trashItem->id);
     if ($this->locationGateway->countLocationsByContentId($trashItem->contentId) < 1) {
         $this->contentHandler->deleteContent($trashItem->contentId);
     }
 }