Say I have an observer, and I want to get the name of the event that's associated with it. What's the proper way to get this string, if it's possible?
e.g. customer_save_after
or controller_action_predispatch_customer_account_createpost
, etc.
event-observermagento-1.7
Say I have an observer, and I want to get the name of the event that's associated with it. What's the proper way to get this string, if it's possible?
e.g. customer_save_after
or controller_action_predispatch_customer_account_createpost
, etc.
Best Answer
To get the name of the triggered event you can use the following code
to see what other data is in the Event object just call getData which will display all the stored data.