delete() public method

public delete ( ) : void
return void
示例#1
0
 /**
  * @throws \Exception
  */
 public function delete()
 {
     if ($this->getId() == 1) {
         throw new \Exception("root-node cannot be deleted");
     }
     parent::delete();
 }
示例#2
0
文件: Concrete.php 项目: sfie/pimcore
 /**
  * @return void
  */
 public function delete()
 {
     // delete all versions
     foreach ($this->getVersions() as $v) {
         $v->delete();
     }
     $this->getDao()->deleteAllTasks();
     parent::delete();
 }