custom/plugins/DockwareSamplePlugin/src/Subscriber/Storefront/Subscriber.php line 24

Open in your IDE?
  1. <?php
  2. namespace DockwareSamplePlugin\Subscriber\Storefront;
  3. use Shopware\Storefront\Event\StorefrontRenderEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class Subscriber implements EventSubscriberInterface
  6. {
  7.     /**
  8.      * @inheritDoc
  9.      */
  10.     public static function getSubscribedEvents()
  11.     {
  12.         return [
  13.             StorefrontRenderEvent::class => 'onStorefrontRender',
  14.         ];
  15.     }
  16.     /**
  17.      * @param StorefrontRenderEvent $event
  18.      */
  19.     public function onStorefrontRender(StorefrontRenderEvent $event)
  20.     {
  21.         $data = array(
  22.             'dockware' => 1,
  23.         );
  24.         $event->setParameter('dockware'$data);
  25.     }
  26. }