< Manual:Hooks
| PreferencesGetLegend | |
|---|---|
| Available from version 1.19.0 Override the text used for the <legend> of a preferences section. | |
| Define function: | public static function onPreferencesGetLegend( $form, $key, &$legend ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"PreferencesGetLegend": "MyExtensionHooks::onPreferencesGetLegend"
}
}
|
| Called from: | File(s): specials/forms/PreferencesFormOOUI.php |
| Interface: | PreferencesGetLegendHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:PreferencesGetLegend extensions.
Details
- $form: the PreferencesForm object. This is a ContextSource as well.
- $key: the section name
- &$legend: the legend text. Defaults to wfMsg( "prefs-$key" ) but may be overridden
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.