Manual:Hooks/EditPage::showEditForm:fields

From mediawiki.org
EditPage::showEditForm:fields
Available from version 1.6.0
Allows injection of form field into edit form.
Define function:
public static function onEditPage_showEditForm_fields( EditPage $editpage, OutputPage $output ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditPage::showEditForm:fields": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageshowEditFormfields"
	}
}
Called from: File(s): EditPage.php
Interface: EditPage__showEditForm_fieldsHook.php

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

Details[edit]

This hook is called before edit box and the toolbar are published.

  • $editpage - The EditPage object.
  • $output - the OutputPage object (added in version 1.12.0)

return value is ignored (should always return true)