custom/plugins/MoorlFoundation/src/Storefront/Subscriber/SalesChannelContextResolvedSubscriber.php line 31

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace MoorlFoundation\Storefront\Subscriber;
  3. use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
  4. use Shopware\Core\Framework\Routing\Event\SalesChannelContextResolvedEvent;
  5. use Shopware\Core\System\SystemConfig\SystemConfigService;
  6. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  7. class SalesChannelContextResolvedSubscriber implements EventSubscriberInterface
  8. {
  9.     private SystemConfigService $systemConfigService;
  10.     private EntityRepositoryInterface $cmsPageRepository;
  11.     public function __construct(
  12.         SystemConfigService $systemConfigService,
  13.         EntityRepositoryInterface $cmsPageRepository
  14.     )
  15.     {
  16.         $this->systemConfigService $systemConfigService;
  17.         $this->cmsPageRepository $cmsPageRepository;
  18.     }
  19.     public static function getSubscribedEvents(): array
  20.     {
  21.         return [
  22.             SalesChannelContextResolvedEvent::class => 'onSalesChannelContextResolvedEvent',
  23.         ];
  24.     }
  25.     public function onSalesChannelContextResolvedEvent(SalesChannelContextResolvedEvent $event): void
  26.     {
  27.     }
  28. }