S
S
symnoob2020-07-02 13:19:57
symfony
symnoob, 2020-07-02 13:19:57

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

1 answer(s)
D
Denis Derepko, 2020-07-02
@symnoob

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 question

Ask a Question

731 491 924 answers to any question