/** * @inheritdoc */ public function getProductsCategories(array $products, Struct\ShopContextInterface $context) { $categories = $this->categoryGateway->getProductsCategories($products, $context); $result = []; foreach ($categories as $key => $productCategories) { $result[$key] = $this->filterValidCategories($productCategories, $context); } return $result; }
/** * @inheritdoc */ public function getList($ids, Struct\ShopContextInterface $context) { $categories = $this->categoryGateway->getList($ids, $context); return $this->filterValidCategories($categories, $context); }