$categories =
$this->categoryGateway->
getList($ids,
$context);
return $this->
filterValidCategories($categories,
$context);
} /**
* {@inheritdoc}
*/
public function getProductsCategories(array
$products, ShopContextInterface
$context) { $categories =
$this->categoryGateway->
getProductsCategories($products,
$context);
$result =
[];
foreach ($categories as $key =>
$productCategories) { $result[$key] =
$this->
filterValidCategories($productCategories,
$context);
} return $result;
} /**
* @param Category[] $categories
*
* @return Category[] $categories Indexed by the category id
*/