Manual:Hooks/EditPageGetCheckboxesDefinition

From MediaWiki.org
Jump to navigation Jump to search
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": "MyExtensionHooks::onEditPageGetCheckboxesDefinition"
	}
}

For MediaWiki ≤1.25:

$wgHooks['EditPageGetCheckboxesDefinition'][] = 'MyExtensionHooks::onEditPageGetCheckboxesDefinition';
Called from:File(s): EditPage.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.