$bannerPath =
$element->
getConfig()->
get('file'
);
$media =
$collection->
getMediaByPath($bannerPath);
$element->
getData()->
set('media',
$media);
if ($media) { $fileInfo =
['width' =>
$media->
getWidth(), 'height' =>
$media->
getHeight()];
$element->
getConfig()->
set('fileInfo',
$fileInfo);
} // hydrate mappings with products
$this->
resolveMappings($collection,
$element);
} private function generateLink(Element
$element, ShopContextInterface
$context): void
{ $link =
$element->
getConfig()->
get('link'
);
if (empty($link)) { return;
} preg_match('/^([a-z]*:\/\/|shopware\.php|mailto:)/i',
$link,
$matches);