コード例 #1
0
 /**
  * Lists all DictCategory models.
  * @return mixed
  */
 public function actionIndex()
 {
     $this->setMenus(43, "字典分类管理");
     $searchModel = new DictCategorySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $message = LsYii::getGetValue('message', '');
     $type = LsYii::getGetValue('type', 1);
     if ($message) {
         if ($type == 1) {
             LsYii::setSuccessMessage($message);
         } else {
             if ($type == 2) {
                 LsYii::setErrorMessage($message);
             }
         }
     }
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
コード例 #2
0
 /**
  * Lists all DictCategory models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new DictCategorySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }