Inheritance: extends common\models\Category
Esempio n. 1
0
 /**
  * Lists all Category models.
  * @return mixed
  */
 public function actionIndex()
 {
     if (Yii::$app->user->can('admin')) {
         $searchModel = new CategorySearch();
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
         return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
     } else {
         return parent::actionLogin();
     }
 }
 /**
  * Lists all CategoryModel models.
  * @return mixed
  */
 public function actionIndex()
 {
     if ($click = Yii::$app->request->get('click')) {
         $view = Yii::$app->view;
         $view->params['click'] = $click;
     }
     $searchModel = new CategorySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Esempio n. 3
0
 /**
  * Lists all Category models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new CategorySearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }