Handler of the {{#property}} parser function.
More...
|
| __construct (array $languageAwareRenderers, array $variants) |
|
| render (EntityId $entityId, $propertyLabelOrId) |
|
Handler of the {{#property}} parser function.
- Copyright
- GPL-2.0-or-later
- Author
- Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
-
Thiemo Kreuz
◆ __construct()
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::__construct |
( |
array |
$languageAwareRenderers, |
|
|
array |
$variants |
|
) |
| |
- Parameters
-
LanguageAwareRenderer[] | $languageAwareRenderers | |
string[] | $variants | |
◆ buildRenderedVariantsArray()
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::buildRenderedVariantsArray |
( |
EntityId |
$entityId, |
|
|
|
$propertyLabelOrId |
|
) |
| |
|
private |
- Parameters
-
EntityId | $entityId | |
string | $propertyLabelOrId | |
- Exceptions
-
- Returns
- string[] key by variant codes
◆ getLanguageAwareRendererFromCode()
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::getLanguageAwareRendererFromCode |
( |
|
$variantCode | ) |
|
|
private |
- Parameters
-
- Exceptions
-
- Returns
- LanguageAwareRenderer
◆ getVariantText()
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::getVariantText |
( |
|
$variantCode, |
|
|
EntityId |
$entityId, |
|
|
|
$propertyLabelOrId |
|
) |
| |
|
private |
- Parameters
-
string | $variantCode | |
EntityId | $entityId | |
string | $propertyLabelOrId | |
- Exceptions
-
- Returns
- string Wikitext
◆ processRenderedArray()
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::processRenderedArray |
( |
array |
$textArray | ) |
|
|
private |
Post-process rendered array (variant text) into wikitext to be used in pages.
- Parameters
-
- Returns
- string Wikitext
◆ render()
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::render |
( |
EntityId |
$entityId, |
|
|
|
$propertyLabelOrId |
|
) |
| |
◆ $languageAwareRenderers
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::$languageAwareRenderers |
|
private |
◆ $variants
Wikibase\Client\DataAccess\ParserFunctions\VariantsAwareRenderer::$variants |
|
private |
The documentation for this class was generated from the following file: