Event ReferenceIntroduction
In this chapter, an attempt will be made to list all events used (or planned for later use)
in the MantisBT event system. Each listed event will include details for the event type, when
the event is called, and the expected parameters and return values for event callbacks.
Here we show an example event definition. For each event, the event identifier will be listed
along with the event type in parentheses. Below that
should be a concise but thorough description of how the event is called and how to use it.
Following that should be a list of event parameters (if any), as well as the expected return
value (if any).
EVENT_EXAMPLE (Default)
This is an example event description.
Parameters<Type>: Description of parameter one<Type>: Description of parameter twoReturn Value<Type>: Description of return value
Plugin System
These events are initiated by the plugin system itself to allow certain functionality to
simplify plugin development.
EVENT_PLUGIN_INIT (Execute)
This event is triggered by the MantisBT plugin system after all registered and enabled
plugins have been initialized (their init() functions have been called).
This event should always be the first event triggered for any
page load. No parameters are passed to hooked functions, and no return values are
expected.
This event is the first point in page execution where all registered plugins are
guaranteed to be enabled (assuming dependencies and such are met). At any point
before this event, any or all plugins may not yet be loaded.
Suggested uses for the event include:
Checking for plugins that aren't require for normal usage.Interacting with other plugins outside the context of pages or events.
Logging
The following event is used to submit a logging message to the plugins. The event gets the
logging string as a parameter. Logging plugins can capture extra context information like
timestamp, current logged in user, etc.
EVENT_LOG (Execute)
This event is triggered by MantisBT to log a message. The contents of the message
should be hyper linked based on the following rules: #123 means issue 123, ~123
means issue note 123, @P123 means project 123, @U123 means user 123.
expected.