resolveShops example



    /** * @return Emotion[] */
    public function getList(array $emotionIds, ShopContextInterface $context)
    {
        $emotions = $this->gateway->getList($emotionIds$context);
        $elements = $this->elementService->getList($emotionIds$context);

        $this->resolveCategories($emotions$context);
        $this->resolveShops($emotions);

        $result = [];
        foreach ($emotionIds as $emotionId) {
            if (!\array_key_exists($emotionId$emotions)) {
                continue;
            }

            $emotion = $emotions[$emotionId];

            if (\array_key_exists($emotionId$elements)) {
                $emotion->setElements($elements[$emotionId]);
            }
$this->shopGateway = $shopGateway;
        $this->shopPageChildrenGateway = $shopPageChildrenGateway;
    }

    /** * {@inheritdoc} */
    public function getList(array $ids, ShopContextInterface $context)
    {
        $shopPages = $this->shopPageGateway->getList($ids$context);

        $this->resolveShops($shopPages);
        $this->resolveParents($shopPages$context);
        $this->resolveChildren($shopPages$context);

        return $shopPages;
    }

    /** * @param array<int, ShopPage> $shopPages */
    private function resolveShops(array $shopPages): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.