Manual:Hooks/ParserLimitReportPrepare
Appearance
ParserLimitReportPrepare | |
---|---|
Available from version 1.22.0 (Gerrit change 53802) Called at the end of Parser:parse() when the parser will include comments about size of the text parsed. | |
Define function: | public static function onParserLimitReportPrepare( $parser, $output ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"ParserLimitReportPrepare": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserLimitReportPrepare"
}
}
|
Called from: | File(s): Parser.php Function(s): makeLimitReport |
Interface: | ParserLimitReportPrepareHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:ParserLimitReportPrepare extensions.
Hooks should use $output->setLimitReportData( $key, $value )
to populate data. Functions for this hook should not use $wgLang
; do that in ParserLimitReportFormat instead, which will be called for every line of the report.
Details
$parser
: Parser object$output
: ParserOutput object