3 namespace MediaWiki\Content\Hook
;
5 use MediaWiki\Content\Content
;
6 use MediaWiki\Parser\ParserOutput
;
7 use MediaWiki\Title\Title
;
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
16 interface ContentAlterParserOutputHook
{
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).
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 );