filterValidCategories example

return array_shift($categories);
    }

    /** * {@inheritdoc} */
    public function getList($ids, ShopContextInterface $context)
    {
        $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) {
            
Home | Imprint | This part of the site doesn't use cookies.