MediaWiki  master
MediaWiki\Content\Hook\ContentGetParserOutputHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. 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

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

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

Stable to implement

Definition at line 17 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: