手册:钩子/BaseTemplateToolbox

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:Hooks/BaseTemplateToolbox and the translation is 33% complete.

Other languages:
English • ‎中文 • ‎日本語
BaseTemplateToolbox
version 1.18.0 (r77893)版可用
Called by BaseTemplate when building the toolbox array and returning it for the skin to output.
定义函数:
public static function onBaseTemplateToolbox( BaseTemplate $baseTemplate, array &$toolbox ) { ... }
附加钩子:

In extension.json:

{
	"Hooks": {
		"BaseTemplateToolbox": "MyExtensionHooks::onBaseTemplateToolbox"
	}
}

For MediaWiki ≤1.25:

$wgHooks['BaseTemplateToolbox'][] = 'MyExtensionHooks::onBaseTemplateToolbox';
调用自: 文件: SkinTemplate.php

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

详情

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