Пример #1
0
 /**
  * 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]);
 }
Пример #2
0
 /**
  * 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]);
 }
Пример #3
0
 /**
  * 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()]);
 }
Пример #4
0
 /**
  * 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]);
 }