|
| | __construct (LanguageFactory $languageFactory) |
| |
| | getHtml (EntityId $entityId, Language $pageLanguage, ?array $labelData=null) |
| | Returns a formatted HTML string containing the localized entity label and id.
|
| |
| | getTitleAttribute (Language $pageLanguage, ?array $labelData=null, ?array $descriptionData=null) |
| | Creates a formatted string containing the localized entity label and description to be displayed on link hover.
|
| |
- Copyright
- GPL-2.0-or-later
◆ __construct()
| Wikibase\Client\Hooks\Formatter\ClientEntityLinkFormatter::__construct |
( |
LanguageFactory | $languageFactory | ) |
|
- Parameters
-
| LanguageFactory | $languageFactory | |
◆ extractTextAndLanguage()
| Wikibase\Client\Hooks\Formatter\ClientEntityLinkFormatter::extractTextAndLanguage |
( |
?array | $termData, |
|
|
Language | $pageLanguage ) |
|
private |
- Parameters
-
| string[] | null | $termData | A term record as returned by TermLanguageFallbackChain::extractPreferredValueOrAny(), containing the 'value' and 'language' fields, or null or an empty array. |
- Returns
- array{0: string, 1: Language}
- See also
- TermLanguageFallbackChain::extractPreferredValueOrAny
◆ getHtml()
| Wikibase\Client\Hooks\Formatter\ClientEntityLinkFormatter::getHtml |
( |
EntityId | $entityId, |
|
|
Language | $pageLanguage, |
|
|
?array | $labelData = null ) |
Returns a formatted HTML string containing the localized entity label and id.
- Parameters
-
| EntityId | $entityId | |
| Language | $pageLanguage | |
| array | null | $labelData | array containing the label's text and language |
- Returns
- string
◆ getTitleAttribute()
| Wikibase\Client\Hooks\Formatter\ClientEntityLinkFormatter::getTitleAttribute |
( |
Language | $pageLanguage, |
|
|
?array | $labelData = null, |
|
|
?array | $descriptionData = null ) |
Creates a formatted string containing the localized entity label and description to be displayed on link hover.
- Parameters
-
| Language | $pageLanguage | |
| array | null | $labelData | array containing the label's text and language |
| array | null | $descriptionData | array containing the description's text and language |
- Returns
- string|null
◆ $languageFactory
| LanguageFactory Wikibase\Client\Hooks\Formatter\ClientEntityLinkFormatter::$languageFactory |
|
private |
The documentation for this class was generated from the following file: