Jump to content

Manual:Hooks/SpecialBlockModifyFormFields

From mediawiki.org
SpecialBlockModifyFormFields
Available from version 1.24.0
Add or modify block fields in Special:Block
Define function:
public static function onSpecialBlockModifyFormFields( SpecialBlock $specialPage, array &$fields ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SpecialBlockModifyFormFields": "MediaWiki\\Extension\\MyExtension\\Hooks::onSpecialBlockModifyFormFields"
	}
}
Called from: File(s): specials/SpecialBlock.php
Function(s): getFormFields
Interface: SpecialBlockModifyFormFieldsHook.php

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


Details

[edit]
  • $specialPage: An instance of SpecialBlock
  • &$fields: An array of HTMLForm fields