Last modified 5 years ago
How do I announce a new event from my listener, filter or plugin?
All user-defined listeners, filters and plugins extend a specific base component. The base components for Listeners, Filters and Plugins in turn extend the MachII.framework.BaseComponent. The BaseComponent provides basic Mach-II functionality such as AnnounceEvent(), set/getParameter() and set/getProperty() to name a few.
Since your listener, filter or plugin is extended, all the methods in the BaseComponent are available. To announce a new event, just call:
<cfset announceEvent("yourNewEventName", arguments.event.getArgs()) />
To announce a new event in another module, just call:
<cfset announceEventInModule("nameOfModule", "yourNewEventName", arguments.event.getArgs()) />
