Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/MaintenanceUpdateAddParams

From mediawiki.org
<Manual:Hooks
MaintenanceUpdateAddParams
Available fromversion 1.33.0 (Gerrit change 498296)
allow extensions to add params to the update.php maintenance script.
Define function:
publicstaticfunctiononMaintenanceUpdateAddParams(array&$params){...}
Attach hook:Inextension.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, seeManual:Hooks.
For examples of extensions using this hook, seeCategory: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.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/MaintenanceUpdateAddParams&oldid=3295243"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp