/**
  * Lists all LetualProduct models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new LetualProductSearch();
     $condition = [];
     if (isset(Yii::$app->request->queryParams['LetualProductSearch'])) {
         $params = Yii::$app->request->queryParams['LetualProductSearch'];
         if ($params['group']) {
             $condition['group'] = $params['group'];
         }
         if ($params['category']) {
             $condition['category'] = $params['category'];
         }
         if ($params['sub_category']) {
             $condition['sub_category'] = $params['sub_category'];
         }
         if ($params['brand']) {
             $condition['brand'] = $params['brand'];
         }
     }
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'condition' => $condition]);
 }
Пример #2
0
 /**
  * @return string
  */
 public function actionIndexDeleted()
 {
     $rivegaucheDataProvider = RivegaucheProductSearch::getStatisticsDeleted();
     $iledebeauteDataProvider = IledebeauteProductSearch::getStatisticsDeleted();
     $letualDataProvider = LetualProductSearch::getStatisticsDeleted();
     $elizeDataProvider = ElizeProductSearch::getStatisticsDeleted();
     return $this->render('index_deleted', ['rivegaucheDataProvider' => $rivegaucheDataProvider, 'iledebeauteDataProvider' => $iledebeauteDataProvider, 'letualDataProvider' => $letualDataProvider, 'elizeDataProvider' => $elizeDataProvider]);
 }