Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / content / Hook / ContentAlterParserOutputHook.php
blobfd5204a080637b8120ae287af6ed00333344525b
1 <?php
3 namespace MediaWiki\Content\Hook;
5 use MediaWiki\Content\Content;
6 use MediaWiki\Parser\ParserOutput;
7 use MediaWiki\Title\Title;
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "ContentAlterParserOutput" to register handlers implementing this interface.
13 * @stable to implement
14 * @ingroup Hooks
16 interface ContentAlterParserOutputHook {
17 /**
18 * Use this hook to modify parser output for a given content object. This hook is called by
19 * Content::getParserOutput after parsing has finished. Can be used for changes that depend
20 * on the result of the parsing but have to be done before LinksUpdate is called (such as
21 * adding tracking categories based on the rendered HTML).
23 * @since 1.35
25 * @param Content $content Content to render
26 * @param Title $title Title of the page, as context
27 * @param ParserOutput $parserOutput ParserOutput to manipulate
28 * @return bool|void True or no return value to continue or false to abort
30 public function onContentAlterParserOutput( $content, $title, $parserOutput );