Manual:Hooks/ParserOutputPostCacheTransform

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
ParserOutputPostCacheTransform
<translate> Available from <tvar name=1><translate> version <tvar (Gerrit change 393260)</tvar></translate>
Called from ParserOutput::getText() to do post-cache transforms.
<translate> Define function:</translate>
public static function onParserOutputPostCacheTransform( $parserOutput, &$text, &$options ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ParserOutputPostCacheTransform": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserOutputPostCacheTransform"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> ParserOutput.php
<translate> Function(s):</translate> getText
<translate> Interface:</translate> ParserOutputPostCacheTransformHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserOutputPostCacheTransform extensions</tvar>.</translate>


Details

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