Ejemplo n.º 1
0
 /**
  * Lists all Role models.
  * @return mixed
  */
 public function actionIndex($category)
 {
     Role::setMenus($category);
     $searchModel = new RoleSearch();
     $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]);
 }
Ejemplo n.º 2
0
 /**
  * Lists all Modularity models.
  * @return mixed
  */
 public function actionIndex()
 {
     $this->setMenus(12, "Modularity Setting");
     $modules = $this->modularityService->getAllModules();
     //        VarDumper::dump($modules , 10 , true , false);
     $dataProvider = new ArrayDataProvider(['allModels' => $modules, 'pagination' => ['pageSize' => 10]]);
     $message = LsYii::getGetValue('message', null);
     $msgType = LsYii::getGetValue('msgType', 1);
     if ($message) {
         if ($msgType == 1) {
             LsYii::setSuccessMessage($message);
         } else {
             if ($msgType == 2) {
                 LsYii::setErrorMessage($message);
             }
         }
     }
     return $this->render('index', ['dataProvider' => $dataProvider]);
 }
Ejemplo n.º 3
0
 /**
  * Lists all Category models.
  * @return mixed
  */
 public function actionIndex()
 {
     $this->setMenus(30, "分类管理");
     $searchModel = new CategorySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $id = LsYii::getGetValue('id', 1);
     $model = $this->findModel($id);
     $message = LsYii::getGetValue('message', null);
     $type = LsYii::getGetValue('type', 1);
     if ($message) {
         if ($type == 1) {
             LsYii::setSuccessMessage($message);
         } else {
             if ($type == 2) {
                 LsYii::setErrorMessage($message);
             }
         }
     }
     return $this->render('index', ['model' => $model, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }