Ejemplo n.º 1
0
 /**
  * Custom actions before deleting a record
  * @return boolean
  */
 protected function beforeDelete()
 {
     if (parent::beforeDelete()) {
         if ($childs = $this->childs) {
             foreach ($childs as $child) {
                 $child->delete();
             }
         }
         return true;
     }
     return false;
 }