getPreviewSecret example

$emotionIds = [(int) $this->Request()->getParam('emotionId')];

        $emotions = $emotionService->getList($emotionIds$shopContext);

        if (!\count($emotions)) {
            return;
        }

        /** @var Emotion $emotion */
        $emotion = reset($emotions);

        if ($emotion->isPreview() && $emotion->getPreviewSecret() !== $this->Request()->getParam('secret')) {
            return;
        }

        $emotions = array_map([$this, 'getLegacyEmotion']$emotions);

        if ($emotion->getTemplate()) {
            $this->View()->loadTemplate('widgets/emotion/' . $emotion->getTemplate()->getFile());
        }

        $this->View()->assign('categoryId', (int) $this->Request()->getParam('categoryId'));
        $this->View()->assign('Controller', (string) $this->Request()->getParam('controllerName'));
        
Home | Imprint | This part of the site doesn't use cookies.