Manual:Hooks/InfoAction
Appearance
InfoAction | |
---|---|
Available from version 1.20.0 (Gerrit change 26743) When building information to display on the action=info page | |
Define function: | public static function onInfoAction( IContextSource $context, array &$pageInfo ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"InfoAction": "MediaWiki\\Extension\\MyExtension\\Hooks::onInfoAction"
}
}
|
Called from: | File(s): actions/InfoAction.php |
Interface: | InfoActionHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:InfoAction extensions.
Details
[edit]- $context: IContextSource object
- &$pageInfo: Array of information
$pageInfo is an array of info groups (with string key; the section title for the group will be taken from the plaintext message pageinfo-$key
). Each info group is an array of info items (with numeric keys). Each info item is a two-element array (with numeric keys); the first element is the type of the information, the second the value. Both can be strings or HTML messages.
The info group keys used by core are: header-basic
, header-edits
, header-restrictions
, header-properties
, category-info
. Extensions can extend those groups or add new ones.