-
Notifications
You must be signed in to change notification settings - Fork 3
Event object
For every event, and in some other instances, a new Event object is created. Handling a request also begins with an event. Additionally, during the event handling other events can be dispatched, which leads to new Event instances.
You can use an Event object just like a struct in the event handlers in your controllers, to pass information on to subsequent tasks. The object itself is not passed to view templates. Views only receive a properties struct, obtained with getProperties().
The Event object has the following methods:
Returns the target of the event.
Returns the event type.
Cancels the event, and stops subsequent task execution for this event.
Returns whether or not the event is canceled.
Returns a struct containing all the data that is put on the object.
Appends the data in the struct on the object. Existing data is not overwritten.
Returns a copy of the event. The clone's canceled state is reset (false).
Aborts event execution. This does not abort the request, control is given back to the caller (usually Application.cfc).