< Manual:Hooks
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( Block $block, string &$key ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"GetBlockErrorMessageKey": "MyExtensionHooks::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.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.