public function beforeDelete() { $ret = false; $ret = self::deleteChildrenOf($this->id); $ret = PagePart::deleteByPageId($this->id); $ret = PageTag::deleteByPageId($this->id); return $ret; }
public function beforeDelete() { if (!Observer::notify('page_before_delete', $this)) { return false; } if (!self::deleteChildrenOf($this->id) || !PagePart::deleteByPageId($this->id) || !PageTag::deleteByPageId($this->id)) { return false; } return true; }