Manual:Hooks/EditPageGetCheckboxesDefinition

Category:MediaWiki hooks#EditPageGetCheckboxesDefinition Category:Hooks added in MediaWiki 1.29.0#EditPageGetCheckboxesDefinition
EditPageGetCheckboxesDefinition
Available from version 1.29.0
Allows modifying the edit checkboxes in the edit form
Define function:
public static function onEditPageGetCheckboxesDefinition( EditPage $editPage, array &$checkboxes ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"EditPageGetCheckboxesDefinition": "MediaWiki\\Extension\\MyExtension\\Hooks::onEditPageGetCheckboxesDefinition"
	}
}
Called from: File(s): EditPage.phpCategory:MediaWiki hooks included in EditPage.php#EditPageGetCheckboxesDefinition
Interface: EditPageGetCheckboxesDefinitionHook.php

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

Details

  • $editPage: The current EditPage object
  • &$checkboxes: Array of checkbox definitions. See EditPage::getCheckboxesDefinition() for the format.

MW 1.35+ This hook allows non-checkbox widgets to be added to the edit form.

Category:Hooks added in MediaWiki 1.29.0 Category:MediaWiki hooks Category:MediaWiki hooks included in EditPage.php