Jump to content

手册:钩子/BaseTemplateToolbox

From mediawiki.org
This page is a translated version of the page Manual:Hooks/BaseTemplateToolbox and the translation is 33% complete.
BaseTemplateToolbox
version 1.18.0 (r77893, codereview)版可用
version 1.37.0 (Gerrit change 708593)版被移除
Called by BaseTemplate when building the toolbox array and returning it for the skin to output.
定义函数:
public static function onBaseTemplateToolbox( BaseTemplate $baseTemplate, array &$toolbox ) { ... }
附加钩子: extension.json中:
{
	"Hooks": {
		"BaseTemplateToolbox": "MediaWiki\\Extension\\MyExtension\\Hooks::onBaseTemplateToolbox"
	}
}
调用自: 文件: SkinTemplate.php
介面: BaseTemplateToolboxHook.php

更多有关附加钩子的信息,请参见Manual:Hooks
有关使用此钩子的扩展示例,请参见Category:BaseTemplateToolbox extensions/zh


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:

详情

You can add items to the toolbox while still letting the skin make final decisions on skin-specific markup conventions using this hook.