<?php
namespace Ecd\econdCrossSelll\Storefront\Event\Subscriber;
use Shopware\Core\System\SystemConfig\SystemConfigService;
use Shopware\Storefront\Event\StorefrontRenderEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class StorefrontRenderEventSubscriber implements EventSubscriberInterface
{
private $systemConfigService;
public function __construct(SystemConfigService $systemConfigService)
{
$this->systemConfigService = $systemConfigService;
}
public static function getSubscribedEvents()
{
return [
StorefrontRenderEvent::class => 'onStorefrontRenderEvent'
];
}
public function onStorefrontRenderEvent(StorefrontRenderEvent $event)
{
$config = $this->systemConfigService->getDomain('econdCrossSelll');
$event->setParameter('ECS',$config);
}
}