Manual:Hooks/SpecialBlockModifyFormFields

From Linux Web Expert

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

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:SpecialBlockModifyFormFields extensions</tvar>.</translate>


Details

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