Manual:Hooks/MaintenanceUpdateAddParams

MaintenanceUpdateAddParams
Available from version 1.33.0 (Gerrit change 498296)
allow extensions to add params to the update.php maintenance script.
Define function:
public static function onMaintenanceUpdateAddParams( array &$params ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"MaintenanceUpdateAddParams": "MediaWiki\\Extension\\MyExtension\\Hooks::onMaintenanceUpdateAddParams"
	}
}
Called from: File(s): ../maintenance/update.php
Function(s): validateParamsAndArgs
Interface: MaintenanceUpdateAddParamsHook.php

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


Details

edit
  • &$params: array to populate with the params to be added. Array elements are keyed by the param name. Each param is an associative array that must include the following keys:
    • 'desc': The description of the param to show on --help
    • 'require': Is the param required? Defaults to false if not set.
    • 'withArg': Is an argument required with this option? Defaults to false if not set.
    • 'shortName': Character to use as short name, or false if none. Defaults to false if not set.
    • 'multiOccurrence': Can this option be passed multiple times? Defaults to false if not set.