Answer the question
In order to leave comments, you need to log in
How to use the kernel.controller event?
In general, I need to change the controller according to a certain logic, I found the kernel.controller event in the docks and hung a method on it:
public function onKernelController(ControllerEvent $event)
{
$controllerName = 'App\Controller\ToController::index';
// вот тут по логике $event->setController();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question