< Manual:Hooks
BaseTemplateToolbox
Available from version 1.18.0 (r77893, codereview)
Removed in version 1.37.0
Called by BaseTemplate when building the toolbox array and returning it for the skin to output.
Define function:
public static function onBaseTemplateToolbox( BaseTemplate $baseTemplate, array &$toolbox ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"BaseTemplateToolbox": "MyExtensionHooks::onBaseTemplateToolbox"
	}
}
Called from: File(s): SkinTemplate.php
Interface: BaseTemplateToolboxHook.php

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

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.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.