Example #1
0
 public function init()
 {
     $modelClass = $this->modelClass;
     $tableName = $modelClass::tableName();
     $this->andFilterWhere([$tableName . '.created_by' => \Yii::$app->user->identity->id]);
     parent::init();
 }
Example #2
0
 public function init()
 {
     //        $modelClass = $this->modelClass;
     //        $tableName = $modelClass::tableName();
     //        $this->andWhere([$tableName.'.active' => 1]);
     $this->orderBy('publish_date DESC');
     parent::init();
 }