コード例 #1
0
ファイル: Page.php プロジェクト: nizsheanez/PolymorphCMS
	/**
	 * 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);
	}
コード例 #2
0
ファイル: Product.php プロジェクト: nizsheanez/PolymorphCMS
 public function beforeDelete()
 {
     if (parent::beforeDelete()) {
         $this->portfolioWorks = array();
         $this->gallery = array();
         $this->workType = array();
         return true;
     }
     return false;
 }
コード例 #3
0
ファイル: Record.php プロジェクト: nizsheanez/PolymorphCMS
	public function beforeSave()
	{
		if (parent::beforeSave()) {
			return true;
		}	
		return false;
	}
コード例 #4
0
	public function beforeDelete()
	{
		if (parent::beforeDelete()) {
			$file ='./'.$this->imgPath.$this->image_name;
			if (is_file($file))
				@unlink($file);
			return true;
		}
		return false;
	}