<?php
namespace App\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\ControllerEvent;
class TwigEventSubscriber implements EventSubscriberInterface
{
public function onKernelController(ControllerEvent $event): void
{
// ...
}
public static function getSubscribedEvents(): array
{
return [
'kernel.controller' => 'onKernelController',
];
}
}