< Manual:Hooks
| 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": "MyExtensionHooks::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
See also
- NewPP parser report
ParsermethodlimitationWarn, used to- ParserLimitReport, the predecessor of this hook used before MW 1.22
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.