Classes

OnGetApiAttributes

Event for getting extra data attributes for an API Entity

You can create a new Event with something like this: $event = AbstractEvent::create('onModelBeforeSomething', $myModel, $arguments); You can access the subject object from your event Listener using $event['subject']. It is up to your listener to determine whether it should apply its functionality against the subject. This AbstractEvent class implements a mutable event which is allowed to change its arguments at runtime. This is generally unadvisable. It's best to use AbstractImmutableEvent instead and constrict all your interaction to the subject class.
« More »