Manual:Hooks/EditPage::showEditForm:fields

From Linux Web Expert

Revision as of 04:20, 25 October 2023 by imported>Ameisenigel (Reverted edits by 2806:106E:27:61F4:8898:4B5A:9E16:3093 (talk) to last version by Clump)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

EditPage::showEditForm:fields
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Allows injection of form field into edit form.
<translate> Define function:</translate>
public static function onEditPage_showEditForm_fields( EditPage $editpage, OutputPage $output ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"EditPage::showEditForm:fields": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageshowEditFormfields"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> EditPage.php
<translate> Interface:</translate> EditPage__showEditForm_fieldsHook.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:EditPage::showEditForm:fields extensions</tvar>.</translate>

Details

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)