Manual:Hooks/SpecialPageBeforeFormDisplay

From MediaWiki.org
Jump to navigation Jump to search
SpecialPageBeforeFormDisplay
Available from version 1.24.0 (Gerrit change 141633)
Before executing the HTMLForm object
Define function:
public static function onSpecialPageBeforeFormDisplay( $name, \HTMLForm &$form ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"SpecialPageBeforeFormDisplay": "MyExtensionHooks::onSpecialPageBeforeFormDisplay"
	}
}

For MediaWiki ≤1.25:

$wgHooks['SpecialPageBeforeFormDisplay'][] = 'MyExtensionHooks::onSpecialPageBeforeFormDisplay';
Called from:File(s): FormSpecialPage.php

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

Details[edit]

  • string $name: name of the special page (without the 'Special:' namespace prefix)
  • \HTMLForm &$form: HTMLForm object