Extension:EventLogging/Hooks/EventLoggingRegisterSchemas

From Linux Web Expert

EventLoggingRegisterSchemas
Available from version ??? (Gerrit change 120957)
Allows extensions to register schema modules by adding keys to an associative array which is passed by reference to each handler. The array maps schema names to numeric revision IDs. By using this hook handler rather than registering modules directly, extensions can have a soft dependency on EventLogging. If EventLogging is not present, the hook simply never fires. To log events for schemas that have been declared in this fashion, use mw#track.
Define function:
public static function onEventLoggingRegisterSchemas( array &$schemas ) { ... }
Attach hook:
$wgHooks['EventLoggingRegisterSchemas'][] = 'MyExtensionHooks::onEventLoggingRegisterSchemas';
Called from:File(s): EventLogging / EventLoggingHooks.php
Function(s): getSchemas

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:EventLoggingRegisterSchemas extensions.

See also