Manual:Hooks/GetBlockErrorMessageKey

Category:MediaWiki hooks#GetBlockErrorMessageKey Category:Hooks added in MediaWiki 1.40.0#GetBlockErrorMessageKey
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.phpCategory:MediaWiki hooks included in BlockFormatter.php#GetBlockErrorMessageKey
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.

Category:Hooks added in MediaWiki 1.40.0 Category:MediaWiki hooks Category:MediaWiki hooks included in BlockFormatter.php