Exemplo n.º 1
0
 /**
  * Get product's list by category
  * @return ActiveDataProvider
  */
 public function getProductsList()
 {
     $ids = $this->id;
     //subcategory
     if ($nested = $this->nestedCategories) {
         $ids = ArrayHelper::getColumn($nested, 'id');
     }
     $productSearch = new ProductSearch(['scenario' => ProductSearch::SCENARIO_CATALOG]);
     return $productSearch->catalogSearch(Yii::$app->request->getQueryParams(), $ids);
 }