custom/plugins/econdLoader/src/Storefront/Event/Subscriber/StorefrontRenderEventSubscriber.php line 32

Open in your IDE?
  1. <?php
  2. namespace Ecd\econdLoader\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.     protected $systemConfigService;
  9.     /**
  10.      * StorefrontRenderEventSubscriber constructor.
  11.      * @param SystemConfigService $systemConfigService
  12.      */
  13.     public function __construct(SystemConfigService $systemConfigService)
  14.     {
  15.         $this->systemConfigService $systemConfigService;
  16.     }
  17.     /**
  18.      * @inheritDoc
  19.      */public static function getSubscribedEvents()
  20.     {
  21.         return [
  22.             StorefrontRenderEvent::class => 'onStorefrontRenderEvent'
  23.         ];
  24.     }
  25.     public function onStorefrontRenderEvent (StorefrontRenderEvent $event)
  26.     {
  27.         $config $this->systemConfigService->getDomain('econdLoader');
  28.         $event->setParameter('ECL',$config);
  29.     }
  30. }