MediaWiki  master
MediaWiki\Content\Hook\ContentGetParserOutputHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Content\Hook\ContentGetParserOutputHook:

Public Member Functions

 onContentGetParserOutput ( $content, $title, $revId, $options, $generateHtml, &$output)
 Use this hook to customize parser output for a given content object. More...

Detailed Description

Stable to implement.

Definition at line 14 of file ContentGetParserOutputHook.php.

Member Function Documentation

◆ onContentGetParserOutput()

MediaWiki\Content\Hook\ContentGetParserOutputHook::onContentGetParserOutput (   $content,

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

This hook is called by AbstractContent::getParserOutput. May be used to override the normal model-specific rendering of page content.

Content$contentContent to render
Title$titleTitle of the page, as context
int$revIdRevision ID, as context
ParserOptions$optionsParserOptions for rendering. To avoid confusing the parser cache, the output can only depend on parameters provided to this hook function, not on global state.
bool$generateHtmlWhether full HTML should be generated. If false, generation of HTML may be skipped, but other information should still be present in the ParserOutput object.
ParserOutput&$outputParserOutput to manipulate or replace
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: