Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView Class Reference

An EntityTermsView that returns placeholders for some parts of the HTML. More...

+ Inheritance diagram for Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView:
+ Collaboration diagram for Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView:

Public Member Functions

 __construct (HtmlTermRenderer $htmlTermRenderer, LabelDescriptionLookup $labelDescriptionLookup, TemplateFactory $templateFactory, EditSectionGenerator $sectionEditLinkGenerator, LocalizedTextProvider $textProvider, TermsListView $termsListView, TextInjector $textInjector)
 
 getHtml ( $mainLanguageCode, TermList $labels, TermList $descriptions, AliasGroupList $aliasGroups=null, EntityId $entityId=null)
 
 getTermsListItems ( $mainLanguageCode, TermList $labels, TermList $descriptions, AliasGroupList $aliasGroups=null)
 
 getPlaceholders (EntityDocument $entity, $revision, $languageCode)
 PhanUndeclaredMethod More...
 
- Public Member Functions inherited from Wikibase\View\SimpleEntityTermsView
 __construct (HtmlTermRenderer $htmlTermRenderer, LabelDescriptionLookup $labelDescriptionLookup, TemplateFactory $templateFactory, EditSectionGenerator $sectionEditLinkGenerator, TermsListView $termsListView, LocalizedTextProvider $textProvider)
 
 getTitleHtml (EntityId $entityId=null)
 

Public Attributes

const TERMBOX_VERSION = 1
 
const CACHE_VERSION = ''
 This is used as a value in the ParserCache termboxVersion entry, prefixed with TERMBOX_VERSION. More...
 
- Public Attributes inherited from Wikibase\View\EntityTermsView
const TERMS_EDIT_SPECIAL_PAGE = 'SetLabelDescriptionAliases'
 
- Public Attributes inherited from Wikibase\View\ViewPlaceHolderEmitter
const ERRONEOUS_PLACEHOLDER_VALUE = null
 

Private Attributes

 $templateFactory
 
 $termsListView
 
 $textInjector
 

Additional Inherited Members

- Protected Member Functions inherited from Wikibase\View\SimpleEntityTermsView
 getHeadingHtml ( $languageCode, EntityId $entityId=null, AliasGroupList $aliasGroups=null)
 
 getTermsLanguageCodes ( $mainLanguageCode, TermList $labels, TermList $descriptions, AliasGroupList $aliasGroups=null)
 
 getHtmlForLabelDescriptionAliasesEditSection ( $languageCode, EntityId $entityId=null)
 

Detailed Description

An EntityTermsView that returns placeholders for some parts of the HTML.

Author
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::__construct ( HtmlTermRenderer  $htmlTermRenderer,
LabelDescriptionLookup  $labelDescriptionLookup,
TemplateFactory  $templateFactory,
EditSectionGenerator  $sectionEditLinkGenerator,
LocalizedTextProvider  $textProvider,
TermsListView  $termsListView,
TextInjector  $textInjector 
)

Member Function Documentation

◆ getHtml()

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::getHtml (   $mainLanguageCode,
TermList  $labels,
TermList  $descriptions,
AliasGroupList  $aliasGroups = null,
EntityId  $entityId = null 
)
Parameters
string$mainLanguageCodeDesired language of the label, description and aliases in the title and header section. Not necessarily identical to the interface language.
TermList$labels
TermList$descriptions
AliasGroupList | null$aliasGroups
EntityId | null$entityIdthe id of the entity
Returns
string HTML

Reimplemented from Wikibase\View\SimpleEntityTermsView.

◆ getPlaceholders()

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::getPlaceholders ( EntityDocument  $entity,
  $revision,
  $languageCode 
)

PhanUndeclaredMethod

Implements Wikibase\View\ViewPlaceHolderEmitter.

◆ getTermsListItems()

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::getTermsListItems (   $mainLanguageCode,
TermList  $labels,
TermList  $descriptions,
AliasGroupList  $aliasGroups = null 
)
Parameters
string$mainLanguageCodeDesired language of the label, description and aliases in the title and header section. Not necessarily identical to the interface language.
TermList$labels
TermList$descriptions
AliasGroupList | null$aliasGroups
Returns
string[] HTML snippets

Member Data Documentation

◆ $templateFactory

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::$templateFactory
private

◆ $termsListView

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::$termsListView
private

◆ $textInjector

Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::$textInjector
private

◆ CACHE_VERSION

const Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::CACHE_VERSION = ''

This is used as a value in the ParserCache termboxVersion entry, prefixed with TERMBOX_VERSION.

Note: It's currently set to '' to avoid unnecessarily purging caches. Starting from the next time this is changed it should be a number, incremented every time the caches need to be purged.

◆ TERMBOX_VERSION

const Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::TERMBOX_VERSION = 1

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