Manual:Hooks/SpecialLogResolveLogType

Category:MediaWiki hooks#SpecialLogResolveLogType Category:Hooks added in MediaWiki 1.45.0#SpecialLogResolveLogType
SpecialLogResolveLogType
Available from version 1.45.0 (Gerrit change 1162921)
Hook for intercepting and changing the requested log type in Special:Log, for example, in order to intercept an alias for the log type and change it to the canonical name.
Define function:
public static function onSpecialLogResolveLogType( array $params, string &$type ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialLogResolveLogType": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialLogResolveLogType"
	}
}
Called from: File(s): specials/SpecialLog.phpCategory:MediaWiki hooks included in SpecialLog.php#SpecialLogResolveLogType
Interface: SpecialLogResolveLogTypeHook.php

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

Parameters

  • $params Request parameters from the URL
  • &$type Log type, which may be changed by the hook
Category:Hooks added in MediaWiki 1.45.0 Category:MediaWiki hooks Category:MediaWiki hooks included in SpecialLog.php