public function afterDelete($event) { if ($this->getOwner() instanceof ISearchable) { HSearch::getInstance()->deleteModel($this->getOwner()); } parent::afterDelete($event); }
public function beforeValidate($event) { if ($this->getOwner()->isNewRecord) { if ($this->getOwner()->guid == "") { $this->getOwner()->guid = UUID::v4(); } } return parent::beforeValidate($event); }