Manual:Hooks/GitViewers

From Linux Web Expert

Revision as of 15:04, 3 March 2021 by imported>Baris6161TURK
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.