Manual:Hooks/BaseTemplateToolbox/de-formal
From Linux Web Expert
File:OOjs UI icon alert-destructive.svg | <translate> This feature was removed from MediaWiki core in version <tvar name=ver>1.37.0</tvar> (after being deprecated in <tvar name=4>1.35.0</tvar>).</translate> <translate> Please see <tvar name=page>SidebarBeforeOutput</tvar> for an alternative way to use this feature.</translate> |
BaseTemplateToolbox | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar (r77893, codereview)</tvar></translate> <translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 708593)</tvar></translate> Called by BaseTemplate when building the toolbox array and returning it for the skin to output. | |
<translate> Define function:</translate> | public static function onBaseTemplateToolbox( BaseTemplate $baseTemplate, array &$toolbox ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"BaseTemplateToolbox": "MediaWiki\\Extension\\MyExtension\\Hooks::onBaseTemplateToolbox"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> SkinTemplate.php |
<translate> Interface:</translate> | BaseTemplateToolboxHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:BaseTemplateToolbox extensions/de-formal</tvar>.</translate>
This hook was deprecated in MW 1.35, and removed in MW 1.37. In its place, you can use either of the following hooks:
- SkinBuildSidebar - respects caching; only called when a page is recreated
- SidebarBeforeOutput - ignores caching; called on every page load
Details
You can add items to the toolbox while still letting the skin make final decisions on skin-specific markup conventions using this hook.
- BaseTemplate $baseTemplate - The BaseTemplate base skin template.
- array &$toolbox - An array of toolbox items, see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array.
Categories:
- MediaWiki hooks/de-formal
- Hooks added in MediaWiki 1.18.0/de-formal
- Pages with broken file links
- MediaWiki deprecated or obsolete features/de-formal
- Hooks removed in MediaWiki 1.37.0/de-formal
- Hooks deprecated in MediaWiki 1.35.0/de-formal
- Removed hooks/de-formal
- MediaWiki hooks included in SkinTemplate.php