Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
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, bool $mulEnabled=false)
 
 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
 
- Public Member Functions inherited from Wikibase\View\SimpleEntityTermsView
 __construct (HtmlTermRenderer $htmlTermRenderer, LabelDescriptionLookup $labelDescriptionLookup, TemplateFactory $templateFactory, EditSectionGenerator $sectionEditLinkGenerator, TermsListView $termsListView, LocalizedTextProvider $textProvider)
 
 getTitleHtml (?EntityId $entityId)
 

Public Attributes

const TERMBOX_VERSION = 1
 
const CACHE_VERSION = ''
 This is used as a value in the ParserCache termboxVersion entry, prefixed with TERMBOX_VERSION.
 
- 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
 
bool $mulEnabled
 

Additional Inherited Members

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

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,
bool $mulEnabled = false )

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

◆ $mulEnabled

bool Wikibase\Repo\ParserOutput\PlaceholderEmittingEntityTermsView::$mulEnabled
private

◆ $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: