generateLink example

return $element->getComponent()->getType() === self::COMPONENT_NAME
            || $element->getComponent()->getConvertFunction() === self::LEGACY_CONVERT_FUNCTION;
    }

    /** * {@inheritdoc} */
    public function prepare(PrepareDataCollection $collection, Element $element, ShopContextInterface $context)
    {
        $collection->addMediaPaths([$element->getConfig()->get('file')]);

        $this->generateLink($element$context);
        $this->addMappings($collection$element$context);
    }

    /** * {@inheritdoc} */
    public function handle(ResolvedDataCollection $collection, Element $element, ShopContextInterface $context)
    {
        $bannerPath = $element->getConfig()->get('file');
        $media = $collection->getMediaByPath($bannerPath);
        $element->getData()->set('media', $media);

        
Home | Imprint | This part of the site doesn't use cookies.