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.