File defining hooks related to magic words.
More...
|
| getRepoName (Language $lang) |
| Gets the user-facing repository name.
|
|
File defining hooks related to magic words.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Client\Hooks\MagicWordHookHandler::__construct |
( |
SettingsArray |
$settings | ) |
|
◆ getRepoName()
Wikibase\Client\Hooks\MagicWordHookHandler::getRepoName |
( |
Language |
$lang | ) |
|
|
protected |
Gets the user-facing repository name.
This can either be a message's text, or the raw value from settings if that is not a message
- Parameters
-
Language | $lang | Language to get text in |
- Returns
- string
◆ newFromGlobalState()
static Wikibase\Client\Hooks\MagicWordHookHandler::newFromGlobalState |
( |
| ) |
|
|
static |
◆ onMagicWordwgVariableIDs()
Wikibase\Client\Hooks\MagicWordHookHandler::onMagicWordwgVariableIDs |
( |
& |
$aCustomVariableIds | ) |
|
Register all magic words.
- Parameters
-
string[] | &$aCustomVariableIds | |
- Returns
- bool
◆ onParserGetVariableValueSwitch()
Wikibase\Client\Hooks\MagicWordHookHandler::onParserGetVariableValueSwitch |
( |
|
$parser, |
|
|
& |
$cache, |
|
|
|
$magicWordId, |
|
|
& |
$ret, |
|
|
|
$frame |
|
) |
| |
Handler for the ParserGetVariableValueSwitch hook.
Apply the magic word.
- Parameters
-
Parser | $parser | |
string[] | &$cache | |
string | $magicWordId | |
| ?string | &$ret |
PPFrame | $frame | |
◆ onResourceLoaderJqueryMsgModuleMagicWords()
Wikibase\Client\Hooks\MagicWordHookHandler::onResourceLoaderJqueryMsgModuleMagicWords |
( |
ResourceLoaderContext |
$context, |
|
|
array & |
$magicWords |
|
) |
| |
Handler for the ResourceLoaderJqueryMsgModuleMagicWords hook.
Adds magic word constant(s) for use by jQueryMsg.
- Parameters
-
ResourceLoaderContext | $context | |
string[] | &$magicWords | Associative array mapping all-caps magic words to string values |
◆ $settings
Wikibase\Client\Hooks\MagicWordHookHandler::$settings |
|
protected |
The documentation for this class was generated from the following file: