コード例 #1
0
ファイル: UserController.php プロジェクト: kocapb/library
 /**
  * Lists all User models.
  * @return mixed
  */
 public function actionIndex()
 {
     $params = Yii::$app->request->queryParams;
     $params = Utils::rememberSearchModel($params, 'UserSearch');
     $searchModel = new UserSearch();
     $dataProvider = $searchModel->search($params);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'cities' => $this->getCitiesView(), 'educations' => $this->getEducationsView()]);
 }
コード例 #2
0
ファイル: BookController.php プロジェクト: kocapb/library
 /**
  * Lists all Book models.
  * @return mixed
  */
 public function actionIndex()
 {
     $params = Yii::$app->request->queryParams;
     $params = Utils::rememberSearchModel($params, 'BookSearch');
     $searchModel = new BookSearch();
     $dataProvider = $searchModel->search($params);
     $authors = $this->getAuthors();
     return $this->render('index', ['dataProvider' => $dataProvider, 'searchModel' => $searchModel, 'authors' => $authors]);
 }