Open main menu

Manual:Hooks/ParserClearState

< Manual:Hooks
ParserClearState
Available from version 1.6.0
called at the end of Parser::clearState()
Define function:
public static function onParserClearState( &$parser ) { ... }
Attach hook:

In extension.json:

{
	"Hooks": {
		"ParserClearState": "MyExtensionHooks::onParserClearState"
	}
}

For MediaWiki ≤1.25:

$wgHooks['ParserClearState'][] = 'MyExtensionHooks::onParserClearState';
Called from:File(s): Parser.php

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

DetailsEdit

$parser: Parser object being cleared