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