I have an Repas (meal) entity in which every baby’s meal is recorded.
I have a Jour (day) entity that stores totals and other relevant information.
Every time a Repas is added or updated, I want to update the Jour entity.
In can do that in the RepasController.php. But, in order to be DRY I want to prevent code duplication in add() and update() methods. Therefore, I’ve create a RepasListener.
The problem I have is that I don’t know how to call a method inside JourController from wihin my listener.
Could anyone give me some help.
Source: Symfony Questions
Was this helpful?
0 / 0