Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\View\TermsListView Class Reference

Generates HTML to display terms of an entity in a list. More...

+ Collaboration diagram for Wikibase\View\TermsListView:

Public Member Functions

 __construct (TemplateFactory $templateFactory, LanguageNameLookup $languageNameLookup, LocalizedTextProvider $textProvider, LanguageDirectionalityLookup $languageDirectionalityLookup, LanguageFallbackChainFactory $languageFallbackChainFactory, bool $mulEnabled)
 
 getHtml (TermList $labels, TermList $descriptions, ?AliasGroupList $aliasGroups, array $languageCodes)
 
 getListViewHtml (string $contentHtml)
 
 getListItemHtml (TermList $labels, TermList $descriptions, ?AliasGroupList $aliasGroups, string $languageCode)
 

Private Member Functions

 getLabelView (TermList $listOfLabelTerms, string $languageCode)
 
 getFallbackLabel (TermList $listOfLabelTerms, string $languageCode)
 
 getDescriptionView (TermList $listOfDescriptionTerms, string $languageCode)
 
 getMulDescriptionView ()
 
 getAliasesView (AliasGroupList $aliasGroups, string $languageCode)
 

Private Attributes

TemplateFactory $templateFactory
 
LanguageDirectionalityLookup $languageDirectionalityLookup
 
LanguageNameLookup $languageNameLookup
 
LocalizedTextProvider $textProvider
 
LanguageFallbackChainFactory $languageFallbackChainFactory
 
bool $mulEnabled
 

Detailed Description

Generates HTML to display terms of an entity in a list.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\TermsListView::__construct ( TemplateFactory $templateFactory,
LanguageNameLookup $languageNameLookup,
LocalizedTextProvider $textProvider,
LanguageDirectionalityLookup $languageDirectionalityLookup,
LanguageFallbackChainFactory $languageFallbackChainFactory,
bool $mulEnabled )

Member Function Documentation

◆ getAliasesView()

Wikibase\View\TermsListView::getAliasesView ( AliasGroupList $aliasGroups,
string $languageCode )
private
Returns
string HTML

◆ getDescriptionView()

Wikibase\View\TermsListView::getDescriptionView ( TermList $listOfDescriptionTerms,
string $languageCode )
private

◆ getFallbackLabel()

Wikibase\View\TermsListView::getFallbackLabel ( TermList $listOfLabelTerms,
string $languageCode )
private

◆ getHtml()

Wikibase\View\TermsListView::getHtml ( TermList $labels,
TermList $descriptions,
?AliasGroupList $aliasGroups,
array $languageCodes )
Parameters
TermList$labels
TermList$descriptions
AliasGroupList | null$aliasGroups
string[]$languageCodesThe languages the user requested to be shown
Returns
string HTML

◆ getLabelView()

Wikibase\View\TermsListView::getLabelView ( TermList $listOfLabelTerms,
string $languageCode )
private

◆ getListItemHtml()

Wikibase\View\TermsListView::getListItemHtml ( TermList $labels,
TermList $descriptions,
?AliasGroupList $aliasGroups,
string $languageCode )
Returns
string HTML

◆ getListViewHtml()

Wikibase\View\TermsListView::getListViewHtml ( string $contentHtml)
Returns
string HTML

◆ getMulDescriptionView()

Wikibase\View\TermsListView::getMulDescriptionView ( )
private

Member Data Documentation

◆ $languageDirectionalityLookup

LanguageDirectionalityLookup Wikibase\View\TermsListView::$languageDirectionalityLookup
private

◆ $languageFallbackChainFactory

LanguageFallbackChainFactory Wikibase\View\TermsListView::$languageFallbackChainFactory
private

◆ $languageNameLookup

LanguageNameLookup Wikibase\View\TermsListView::$languageNameLookup
private

◆ $mulEnabled

bool Wikibase\View\TermsListView::$mulEnabled
private

◆ $templateFactory

TemplateFactory Wikibase\View\TermsListView::$templateFactory
private

◆ $textProvider

LocalizedTextProvider Wikibase\View\TermsListView::$textProvider
private

The documentation for this class was generated from the following file: