예제 #1
0
파일: Offers.php 프로젝트: jwerd/coupon
 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();
 }
예제 #2
0
 /**
  * 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);
 }
예제 #3
0
파일: Media.php 프로젝트: jwerd/coupon
 public function afterSave()
 {
     $this->addImages();
     parent::afterSave();
 }