MediaWiki master
MediaWiki\Api\Hook\ApiFormatHighlightHook Interface Reference

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

Inherited by MediaWiki\Api\ApiHookRunner.

Public Member Functions

 onApiFormatHighlight ( $context, $text, $mime, $format)
 Use this hook to syntax-highlight API pretty-printed output.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 14 of file ApiFormatHighlightHook.php.

Member Function Documentation

◆ onApiFormatHighlight()

MediaWiki\Api\Hook\ApiFormatHighlightHook::onApiFormatHighlight ( $context,
$text,
$mime,
$format )

Use this hook to syntax-highlight API pretty-printed output.

Since
1.35
Parameters
IContextSource$context
string$textText to be highlighted
string$mimeMIME type of $text
string$formatAPI format code for $text
Returns
bool|void True or no return value to continue, or false and add output to $context->getOutput() to highlight

Implemented in MediaWiki\Api\ApiHookRunner.


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