Manual:Hooks/ParserTestParser

From Linux Web Expert

ParserTestParser
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
called when creating a new instance of Parser for parser tests
<translate> Define function:</translate>
public static function onParserTestParser( $parser ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ParserTestParser": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserTestParser"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> ../tests/parser/ParserTestRunner.php
<translate> Interface:</translate> ParserTestParserHook.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:ParserTestParser extensions</tvar>.</translate>

Details

  • $parser: Parser object created