Manual:Hooks/BaseTemplateToolbox/pl
Appearance
Ta funkcja została usunięta z jądra MediaWiki w wersji 1.37.0 (po wycofaniu w 1.35.0). Proszę zobaczyć alternatywny sposób użycia tej funkcji na SidebarBeforeOutput. |
BaseTemplateToolbox | |
---|---|
Dostępne od wersji version 1.18.0 (r77893, CodeReview archive) Usunięto w version 1.37.0 (Gerrit change 708593) Called by BaseTemplate when building the toolbox array and returning it for the skin to output. | |
Zdefiniuj funkcję: | public static function onBaseTemplateToolbox( BaseTemplate $baseTemplate, array &$toolbox ) { ... }
|
Dołącz hak: | W extension.json:
{
"Hooks": {
"BaseTemplateToolbox": "MediaWiki\\Extension\\MyExtension\\Hooks::onBaseTemplateToolbox"
}
}
|
Called from: | Plik(i): SkinTemplate.php |
Interface: | BaseTemplateToolboxHook.php |
For more information about attaching hooks, see Podręcznik:Haki .
For examples of extensions using this hook, see Category:BaseTemplateToolbox extensions/pl.
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
Szczegóły
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.