Manual:Hooks/ParserTestParser

Category:MediaWiki hooks#ParserTestParser Category:Hooks added in MediaWiki 1.6.0#ParserTestParser
ParserTestParser
Available from version 1.6.0
called when creating a new instance of Parser for parser tests
Define function:
public static function onParserTestParser( $parser ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserTestParser": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserTestParser"
	}
}
Called from: File(s): ../tests/parser/ParserTestRunner.phpCategory:MediaWiki hooks included in ParserTestRunner.php#ParserTestParser
Interface: ParserTestParserHook.php

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

Details

  • $parser: Parser object created
Category:Hooks added in MediaWiki 1.6.0 Category:MediaWiki hooks Category:MediaWiki hooks included in ParserTestRunner.php