|
MediaWiki master
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
| onParserGetVariableValueSwitch ( $parser, &$variableCache, $magicWordId, &$ret, $frame) | |
| This hook is called when the parser needs the value of a custom magic word. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ParserGetVariableValueSwitch" to register handlers implementing this interface.
Definition at line 15 of file ParserGetVariableValueSwitchHook.php.
| MediaWiki\Parser\Hook\ParserGetVariableValueSwitchHook::onParserGetVariableValueSwitch | ( | $parser, | |
| & | $variableCache, | ||
| $magicWordId, | |||
| & | $ret, | ||
| $frame ) |
This hook is called when the parser needs the value of a custom magic word.
| Parser | $parser | |
| array | &$variableCache | Deprecated since 1.35 and unused since 1.39 |
| string | $magicWordId | Normalized, canonical id for the magic word. Each extension should check if it is responsible for the given magic word (registered via GetMagicVariableIDs). |
| string | &$ret | Value of the magic word. For magic words which an extension has registered with the GetMagicVariableIDs hook, the extension should use this hook to set $ret to a non-null string; it should be left untouched otherwise. |
| PPFrame | $frame | PPFrame object to use for expanding any template variables |
Implemented in MediaWiki\HookContainer\HookRunner.