Jump to content

Handbuch:Hooks/ParserFirstCallInit

From mediawiki.org
This page is a translated version of the page Manual:Hooks/ParserFirstCallInit and the translation is 27% complete.
ParserFirstCallInit
Erhältlich ab Version 1.12.0
called when the parser initializes for the first time
Funktion definieren:
public static function onParserFirstCallInit( Parser $parser ) { ... }
Haken anbringen: In extension.json:
{
	"Hooks": {
		"ParserFirstCallInit": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserFirstCallInit"
	}
}
Angerufen von: Datei(en): parser/Parser.php
Funktion(en): __construct
Interface: ParserFirstCallInitHook.php

For more information about attaching hooks, see Handbuch:Hooks .
For examples of extensions using this hook, see Category:ParserFirstCallInit extensions/de.

Details

  • Parser $parser: Parser object being initialized

Beispiele

For examples on how this hook should be used, please see:

Phabricator

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

See also