Some plugins may need to be invoked to perform certain tasks immediately before or after an action has occurred. For this reason plugins may register plugin events. These Events automatically initialize the plugin and invoke the desired event handler (i.e. callback method) when triggered. All event handlers accept a single EventObject parameter parameter.
For performing tasks at regular intervals see Plugin Cron Tasks.
Warning | ||
---|---|---|
| ||
When implementing this you should not check the EventObject class because it has been deprecated and will be replaced by EventInterface in v5.0.0. |
Adding Plugin Events
To add plugin events, simply return them from your plugin's getEvents() method.
...