Exemplo n.º 1
0
 public function beforeDelete($event)
 {
     UserFollow::model()->deleteAllByAttributes(array('object_model' => get_class($this->getOwner()), 'object_id' => $this->getOwner()->getPrimaryKey()));
     return parent::beforeValidate($event);
 }