custom/plugins/econdCrossSelll/src/Storefront/Event/Subscriber/StorefrontRenderEventSubscriber.php line 26

Open in your IDE?
  1. <?php
  2. namespace Ecd\econdCrossSelll\Storefront\Event\Subscriber;
  3. use Shopware\Core\System\SystemConfig\SystemConfigService;
  4. use Shopware\Storefront\Event\StorefrontRenderEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class StorefrontRenderEventSubscriber implements EventSubscriberInterface
  7. {
  8.     private $systemConfigService;
  9.     public function __construct(SystemConfigService $systemConfigService)
  10.     {
  11.         $this->systemConfigService $systemConfigService;
  12.     }
  13.     public static function getSubscribedEvents()
  14.     {
  15.         return [
  16.             StorefrontRenderEvent::class => 'onStorefrontRenderEvent'
  17.         ];
  18.     }
  19.     public function onStorefrontRenderEvent(StorefrontRenderEvent $event)
  20.     {
  21.         $config $this->systemConfigService->getDomain('econdCrossSelll');
  22.         $event->setParameter('ECS',$config);
  23.     }
  24. }