getElementShopValue example

foreach ($values as $data) {
            // Get the element using the name             $element = $this->getElementByName(
                $template->getElements(),
                $data['elementName']
            );

            if (!($element instanceof Element)) {
                continue;
            }

            $value = $this->getElementShopValue(
                $element->getValues(),
                $data['shopId']
            );

            $shop = $this->entityManager->getReference(Shop::class$data['shopId']);
            if (!$shop instanceof Shop) {
                throw new ModelNotFoundException(Shop::class$data['shopId']);
            }

            if ($element->getType() === 'theme-media-selection') {
                $data['value'] = $this->mediaService->normalize($data['value']);
            }
Home | Imprint | This part of the site doesn't use cookies.