Manual:Hooks/ParserCacheSaveComplete
Appearance
| ParserCacheSaveComplete | |
|---|---|
| Available from version 1.26.0 Modify ParserOutput safely after it has been saved to cache. | |
| Define function: | public static function onParserCacheSaveComplete( ParserCache $parserCache, ParserOutput $parserOutput, Title $title, ParserOptions $parserOptions, int $revId ) { ... }
|
| Attach hook: | In extension.json:
{
"Hooks": {
"ParserCacheSaveComplete": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserCacheSaveComplete"
}
}
|
| Called from: | File(s): parser/ParserCache.php Function(s): save |
| Interface: | ParserCacheSaveCompleteHook.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:ParserCacheSaveComplete extensions.
Parameters
[edit]$parserCache:ParserCacheobject that$parserOutputwas stored in$parserOutput:ParserOutputobject that was stored$title:Titleof the page that was parsed to generate$parserOutput$popts:ParserOptionsused for generating$parserOutput$revId: Anintrepresenting the ID of the revision that was parsed to create$parserOutput