MediaWiki REL1_35
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.
 

Detailed Description

Stable to implement.

Definition at line 14 of file ContentGetParserOutputHook.php.

Member Function Documentation

◆ onContentGetParserOutput()

MediaWiki\Content\Hook\ContentGetParserOutputHook::onContentGetParserOutput (   $content,
  $title,
  $revId,
  $options,
  $generateHtml,
$output 
)

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.

Since
1.35
Parameters
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
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: