Hi!
First of all, I apologize for my bad english
The treatment related event I would like to ask for help from you.
Given a User controller, this have a method called actionAdd and actionMod, actionAdd when called, it is afterSave from I would like to make a certain thing happen , but if the actionMod is called, you also want to make afterSave to make something happen, but not the such that the at actionAdd.
How should this be done?
-
In the model class, afterSave look at what this model scenario and decide what to do with the basis of?
-
In the User controller class, in the action with method attachEventHandler attach event handlers?
Do you have any other ideas which can be performed in much the whole thing ?
Unfortunately, I did not get the first two out of me different, but I’m not sure that these are the best solutions.
A larger system is concerned, that is more event handler can be supplied to a controller, only written for the sake of simplicity, the example to illustrate the problem.
Thank you in advance for your help!