<?php
namespace B2bOffer\Subscriber;
use B2bOffer\Setup\PlatformMenuInstaller;
use B2bSellersCore\Components\B2bPlatform\PlatformMenu\Event\PlatformMenuRebuildEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class PlatformMenuSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
PlatformMenuRebuildEvent::class => 'rebuildPlatformMenu'
];
}
public function rebuildPlatformMenu(PlatformMenuRebuildEvent $event)
{
(new PlatformMenuInstaller())->install($event->getConnection());
}
}