/** * Lists all Admin models. * @return mixed */ public function actionIndex() { $model = new Admin(); $searchModel = new AdminSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'model' => $model]); }
/** * Lists all Admin models. * @return mixed */ public function actionIndex() { $session = Yii::$app->session; if (!$session->isActive) { $session->open(); } if ($session['user'] == null || $session['user']['permission'] != 0) { return $this->redirect('?r=login'); } $searchModel = new AdminSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }
/** * Lists all Admin models. * @param array $params * @return string */ protected function search($params) { $searchModel = new AdminSearch(); $dataProvider = $searchModel->search($params); return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'honors' => AdminRole::honorMap()]); }
/** * Lists all Admin models. * @return mixed */ public function actionSystem() { $searchModel = new AdminSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('system', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]); }