public function beforeFind() { $criteria = new CDbCriteria(); if (!Yii::app()->controller->isAdmin()) { //$criteria->condition = "t.published = 1"; //$criteria->params = array(':site_id'=>Sites::model()->getCurrentSite()); } $this->dbCriteria->mergeWith($criteria); parent::beforeFind(); }
/** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return CreditsItems the static model class */ public static function model($className = __CLASS__) { return parent::model($className); }
public function afterSave() { $this->addImages(); parent::afterSave(); }