Manual:Hooks/ActionBeforeFormDisplay

From MediaWiki.org
Jump to navigation Jump to search
ActionBeforeFormDisplay
Available from version 1.18.0 (r86001)
Before executing the HTMLForm object
Define function:
public static function onActionBeforeFormDisplay( $name, &$form, $article ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ActionBeforeFormDisplay": "MyExtensionHooks::onActionBeforeFormDisplay"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ActionBeforeFormDisplay'][] = 'MyExtensionHooks::onActionBeforeFormDisplay';
Called from:File(s): actions/FormAction.php

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

Details[edit]

  • $name: name of the action
  • &$form: HTMLForm object
  • $article: Article object

See also[edit]