MediaWiki master
MediaWiki\Content\Hook\ContentAlterParserOutputHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onContentAlterParserOutput ( $content, $title, $parserOutput)
 Use this hook to modify parser output for a given content object.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ContentAlterParserOutput" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 16 of file ContentAlterParserOutputHook.php.

Member Function Documentation

◆ onContentAlterParserOutput()

MediaWiki\Content\Hook\ContentAlterParserOutputHook::onContentAlterParserOutput (   $content,
  $title,
  $parserOutput 
)

Use this hook to modify parser output for a given content object.

This hook is called by Content::getParserOutput after parsing has finished. Can be used for changes that depend on the result of the parsing but have to be done before LinksUpdate is called (such as adding tracking categories based on the rendered HTML).

Since
1.35
Parameters
Content$contentContent to render
Title$titleTitle of the page, as context
ParserOutput$parserOutputParserOutput to manipulate
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: