Wikibase
MediaWiki Wikibase extension
Wikibase\View\TermsListView Class Reference

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

Public Member Functions

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

Private Member Functions

 getTermView (TermList $termList, $templateName, $emptyTextKey, $languageCode)
 
 getAliasesView (AliasGroupList $aliasGroups, $languageCode)
 

Private Attributes

 $templateFactory
 
 $languageDirectionalityLookup
 
 $languageNameLookup
 
 $textProvider
 

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 
)

Member Function Documentation

◆ getAliasesView()

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

◆ 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

◆ getListItemHtml()

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

◆ getListViewHtml()

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

◆ getTermView()

Wikibase\View\TermsListView::getTermView ( TermList  $termList,
  $templateName,
  $emptyTextKey,
  $languageCode 
)
private

Member Data Documentation

◆ $languageDirectionalityLookup

Wikibase\View\TermsListView::$languageDirectionalityLookup
private

◆ $languageNameLookup

Wikibase\View\TermsListView::$languageNameLookup
private

◆ $templateFactory

Wikibase\View\TermsListView::$templateFactory
private

◆ $textProvider

Wikibase\View\TermsListView::$textProvider
private

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