getDevicesWithListing example


    protected function getEmotionConfiguration($categoryId$withStreams = false, $streamId = null)
    {
        $context = $this->contextService->getShopContext();

        $emotions = $this->storeFrontEmotionDeviceConfiguration->getCategoryConfiguration($categoryId$context$withStreams);

        $emotions = $this->filterListingEmotions($emotions);

        $isHomePage = $context->getShop()->getCategory()->getId() === $categoryId;

        $devicesWithListing = $this->getDevicesWithListing($emotions);
        if ($isHomePage) {
            $devicesWithListing = [];
        }

        return [
            'emotions' => $emotions,
            'hasEmotion' => !empty($emotions),
            'showListing' => $this->hasListing($emotions$devicesWithListing),
            'showListingDevices' => $devicesWithListing,
            'isHomePage' => $isHomePage,
            'showListingButton' => $this->hasProducts($categoryId$context$streamId),
        ];
Home | Imprint | This part of the site doesn't use cookies.