custom/plugins/b2bsellerscore/addons/B2bOffer/Subscriber/PlatformMenuSubscriber.php line 18

Open in your IDE?
  1. <?php
  2. namespace B2bOffer\Subscriber;
  3. use B2bOffer\Setup\PlatformMenuInstaller;
  4. use B2bSellersCore\Components\B2bPlatform\PlatformMenu\Event\PlatformMenuRebuildEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class PlatformMenuSubscriber implements EventSubscriberInterface
  7. {
  8.     public static function getSubscribedEvents(): array
  9.     {
  10.         return [
  11.             PlatformMenuRebuildEvent::class => 'rebuildPlatformMenu'
  12.         ];
  13.     }
  14.     public function rebuildPlatformMenu(PlatformMenuRebuildEvent $event)
  15.     {
  16.         (new PlatformMenuInstaller())->install($event->getConnection());
  17.     }
  18. }