Manual:Hooks/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.php
Interface: EditPageGetCheckboxesDefinitionHook.php

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


Details

edit
  • $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.