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
System Events
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. Note that the core
system has not yet completed the bootstrap process when this event is signalled.
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.
EVENT_CORE_READY (Execute)
This event is triggered by the MantisBT bootstrap process after all core APIs have
been initialized, including the plugin system, but before control is relinquished
from the bootstrap process back to the originating page. No parameters are passed
to hooked functions, and no return values are expected.
This event is the first point in page execution where the entire system is considered
loaded and ready.
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. Logging plugins
can capture extra context information like timestamp, current logged in user, etc.
This event receives the logging string as a parameter.