< Manual:Hooks
ParserFirstCallInit
Available from version 1.12.0
called when the parser initializes for the first time
Define function:
public static function onParserFirstCallInit( Parser $parser ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserFirstCallInit": "MyExtensionHooks::onParserFirstCallInit"
	}
}
Called from: File(s): parser/Parser.php
Function(s): firstCallInit
Interface: ParserFirstCallInitHook.php

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

Details

  • Parser $parser: Parser object being initialized

Examples

For examples on how this hook should be used, please see Manual:Parser functions and Manual:Tag extensions.

Phabricator

  • phab:T299528 - Deprecate and remove ParserFirstCallInit hook (move hook/tag registration out of Parser constructor)
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.