Answer the question
In order to leave comments, you need to log in
Symfony - how to start a listener so that it is launched when a specific method is called in the controller?
Hello everyone, I would like to understand the magic of the symphony.
How does the listener work in symphony?
For example, you need to do something if there was a request for a specific method in the controller.
How to trigger it?
Answer the question
In order to leave comments, you need to log in
What magic?
Symfony events
Creating listeners
An example of calling an event
A simple example of implementing an Event Dispatcher
You can subscribe to this event or this and call your logic if the desired method is called
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question