Manual:Hooks/ParserFirstCallInit/cs

From Linux Web Expert

ParserFirstCallInit
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
volá se při první inicializaci analyzátoru
<translate> Define function:</translate>
public static function onParserFirstCallInit( Parser $parser ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ParserFirstCallInit": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserFirstCallInit"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> parser/Parser.php
<translate> Function(s):</translate> __construct
<translate> Interface:</translate> ParserFirstCallInitHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Příručka:Háčky </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserFirstCallInit extensions/cs</tvar>.</translate>

Podrobnosti

  • Parser $parser: inicializuje analyzátor

Příklady

Příklady použití tohoto háčku najdete na stránkách:

Phabricator

  • phab:T299528 - Deprecate and remove ParserFirstCallInit hook (move hook/tag registration out of Parser constructor)

See also