Wikibase
MediaWiki Wikibase extension
|
Class representing the disambiguation of a list of WikibaseItems. More...
Public Member Functions | |
__construct (EntityTitleLookup $titleLookup, LanguageNameLookup $languageNameLookup) | |
getHTML (array $searchResults) | |
Builds and returns the HTML to represent the WikibaseItem. | |
getResultHtml (TermSearchResult $searchResult) | |
Private Member Functions | |
getIdHtml (EntityId $entityId) | |
Returns HTML representing the label in the display language (or an appropriate fallback). | |
getLabelHtml (?Term $label) | |
Returns HTML representing the label in the display language (or an appropriate fallback). | |
getDescriptionHtml (?Term $description) | |
Returns HTML representing the description in the display language (or an appropriate fallback). | |
getMatchHtml (Term $match, ?Term $label) | |
Returns HTML representing the matched term in the search language (or an appropriate fallback). | |
Private Attributes | |
EntityTitleLookup | $titleLookup |
LanguageNameLookup | $languageNameLookup |
Class representing the disambiguation of a list of WikibaseItems.
Wikibase\Repo\ItemDisambiguation::__construct | ( | EntityTitleLookup | $titleLookup, |
LanguageNameLookup | $languageNameLookup ) |
|
private |
Returns HTML representing the description in the display language (or an appropriate fallback).
Wikibase\Repo\ItemDisambiguation::getHTML | ( | array | $searchResults | ) |
Builds and returns the HTML to represent the WikibaseItem.
TermSearchResult[] | $searchResults |
|
private |
Returns HTML representing the label in the display language (or an appropriate fallback).
|
private |
Returns HTML representing the label in the display language (or an appropriate fallback).
Returns HTML representing the matched term in the search language (or an appropriate fallback).
The matched text and language are wrapped using the wikibase-itemlink-userlang-wrapper message. If the matched term has the same text as the display label, an empty string is returned.
Wikibase\Repo\ItemDisambiguation::getResultHtml | ( | TermSearchResult | $searchResult | ) |
|
private |
|
private |