コード例 #1
0
 public function actions()
 {
     $actions = parent::actions();
     $actions['index']['prepareDataProvider'] = function ($action) {
         $modelClass = $action->modelClass;
         return new \yii\data\ActiveDataProvider(['query' => $modelClass::find()->andWhere(["category_id" => null])->with('categories')->with('services'), 'pagination' => ['pageSize' => 10000]]);
     };
     return $actions;
 }
コード例 #2
0
 public function actions()
 {
     $actions = parent::actions();
     $actions['view']['modelClass'] = 'app\\models\\PlaceExtended';
     return $actions;
 }