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; }
public function actions() { $actions = parent::actions(); $actions['view']['modelClass'] = 'app\\models\\PlaceExtended'; return $actions; }