controllers/CrudController.php
public function actionIndex()
    {
        $searchModel = Yii::createObject($this->getModelClass(static::KEY_SEARCH));
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render($this->viewID, [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex()
    {
        $searchModel = Yii::createObject($this->getModelClass(static::KEY_SEARCH));
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render($this->viewID, [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }
public function actionIndex ( ) { $ searchModel = Yii :: createObject ( $ this -> getModelClass ( static :: KEY_SEARCH ) ) ; $ dataProvider = $ searchModel -> search ( Yii :: $ app -> request -> queryParams ) ; return $ this -> render ( $ this -> viewID , [ 'searchModel' => $ searchModel , 'dataProvider' => $ dataProvider , ] ) ; }
Lists all target models.
@return string
Lists all target models .