Manual:Hooks/GetBlockErrorMessageKey
Appearance
GetBlockErrorMessageKey | |
---|---|
Available from version 1.40.0 (Gerrit change 832302) Allows extensions to override the message that will be displayed to the user. | |
Define function: | public static function onGetBlockErrorMessageKey( MediaWiki\Block\Block $block, string &$key ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"GetBlockErrorMessageKey": "MediaWiki\\Extension\\MyExtension\\Hooks::onGetBlockErrorMessageKey"
}
}
|
Called from: | File(s): block/BlockFormatter.php Function(s): getBlockErrorMessageKey |
Interface: | GetBlockErrorMessageKeyHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:GetBlockErrorMessageKey extensions.