custom/plugins/NetiNextEasyCoupon/src/Subscriber/KernelRequestSubscriber.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace NetInventors\NetiNextEasyCoupon\Subscriber;
  4. use Composer\EventDispatcher\EventSubscriberInterface;
  5. use Symfony\Component\HttpKernel\Event\RequestEvent;
  6. use Symfony\Component\HttpKernel\KernelEvents;
  7. class KernelRequestSubscriber implements EventSubscriberInterface
  8. {
  9.     public static function getSubscribedEvents(): array
  10.     {
  11.         return [
  12.             KernelEvents::REQUEST => 'onKernelRequest',
  13.         ];
  14.     }
  15.     public function onKernelRequest(RequestEvent $event): void
  16.     {
  17.         // @TODO Eventually deletable for production package
  18.         // This only affects the storefront
  19.         if ('frontend.checkout.promotion.add' !== $event->getRequest()->get('_route')) {
  20.             return;
  21.         }
  22.     }
  23. }