Manual:Hooks/GitViewers

From Linux Web Expert

GitViewers
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
Called when generating the list of git viewers for Special:Version, use this to change the list.
<translate> Define function:</translate>
public static function onGitViewers( &$extTypes ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"GitViewers": "MediaWiki\\Extension\\MyExtension\\Hooks::onGitViewers"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> GitInfo.php
<translate> Interface:</translate> GitViewersHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:GitViewers extensions</tvar>.</translate>


Details

  • &$extTypes: associative array of repo URLS to viewer URLs.