/** * Returns the static model of the specified AR class. * @return Lookup the static model class */ public static function model($className=__CLASS__) { return parent::model($className); }
public function beforeDelete() { if (parent::beforeDelete()) { $this->portfolioWorks = array(); $this->gallery = array(); $this->workType = array(); return true; } return false; }
public function beforeSave() { if (parent::beforeSave()) { return true; } return false; }
public function beforeDelete() { if (parent::beforeDelete()) { $file ='./'.$this->imgPath.$this->image_name; if (is_file($file)) @unlink($file); return true; } return false; }