Jump to content

Manual:Hooks/SkinTemplateTabAction

From mediawiki.org
SkinTemplateTabAction
Available from version 1.12.0
Removed in version 1.37.0 (Gerrit change 701109)
Override SkinTemplate::tabAction().
Define function:
public static function onSkinTemplateTabAction( &$sktemplate, $title, $message, $selected, $checkEdit, &$classes, &$query, &$text, &$result ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"SkinTemplateTabAction": "MediaWiki\\Extension\\MyExtension\\Hooks::onSkinTemplateTabAction"
	}
}
Called from: File(s): skins/SkinTemplate.php
Interface: SkinTemplateTabActionHook.php

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


Details

[edit]

You can either create your own array, or alter the parameters for the normal one.

  • &$sktemplate: The SkinTemplate instance.
  • $title: Title instance for the page.
  • $message: Visible label of tab.
  • $selected: Whether this is a selected tab.
  • $checkEdit: Whether or not the action=edit query should be added if appropriate.
  • &$classes: Array of CSS classes to apply.
  • &$query: Query string to add to link.
  • &$text: Link text.
  • &$result: Complete assoc. array if you want to return true.