Jump to content

Manual:Hooks/ParserOutputPostCacheTransform

From mediawiki.org
ParserOutputPostCacheTransform
Available from version 1.31.0 (Gerrit change 393260)
Called from ParserOutput::getText() to do post-cache transforms.
Define function:
public static function onParserOutputPostCacheTransform( $parserOutput, &$text, &$options ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"ParserOutputPostCacheTransform": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserOutputPostCacheTransform"
	}
}
Called from: File(s): ParserOutput.php
Function(s): getText
Interface: ParserOutputPostCacheTransformHook.php

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


Details

[edit]
  • $parserOutput: The ParserOutput object.
  • &$text: The text being transformed, before core transformations are done.
  • &$options: The options array being used for the transformation.