/** * @throws \Exception */ public function delete() { if ($this->getId() == 1) { throw new \Exception("root-node cannot be deleted"); } parent::delete(); }
/** * @return void */ public function delete() { // delete all versions foreach ($this->getVersions() as $v) { $v->delete(); } $this->getDao()->deleteAllTasks(); parent::delete(); }