MediaWiki REL1_35
MediaWiki\Hook\ParserGetVariableValueSwitchHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Hook\ParserGetVariableValueSwitchHook:

Public Member Functions

 onParserGetVariableValueSwitch ( $parser, &$variableCache, $magicWordId, &$ret, $frame)
 This hook is called when the parser needs the value of a custom magic word.
 

Detailed Description

Stable to implement.

Definition at line 12 of file ParserGetVariableValueSwitchHook.php.

Member Function Documentation

◆ onParserGetVariableValueSwitch()

MediaWiki\Hook\ParserGetVariableValueSwitchHook::onParserGetVariableValueSwitch (   $parser,
$variableCache,
  $magicWordId,
$ret,
  $frame 
)

This hook is called when the parser needs the value of a custom magic word.

Since
1.35
Parameters
Parser$parser
array&$variableCacheArray to cache the value; when you return $variableCache[$magicWordId] should be the same as $ret
string$magicWordIdIndex of the magic word (hook should not mutate it!)
string&$retValue of the magic word (the hook should set it)
PPFrame$framePPFrame object to use for expanding any template variables
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: