custom/plugins/NetzpShopmanager6/src/Core/Content/Flow/Subscriber/BusinessEventCollectorSubscriber.php line 18

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace NetzpShopmanager6\Core\Content\Flow\Subscriber;
  3. use NetzpShopmanager6\Core\Framework\Event\MobilePushAware;
  4. use Shopware\Core\Framework\Event\BusinessEventCollectorEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class BusinessEventCollectorSubscriber implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents()
  9.     {
  10.         return [
  11.             BusinessEventCollectorEvent::NAME => 'addMobilePushAware',
  12.         ];
  13.     }
  14.     public function addMobilePushAware(BusinessEventCollectorEvent $event): void
  15.     {
  16.         foreach ($event->getCollection()->getElements() as $definition) {
  17.             $definition->addAware(MobilePushAware::class);
  18.         }
  19.     }
  20. }