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

This is a basic factory to create views for DataModel objects. More...

Public Member Functions

 __construct (EntityIdFormatterFactory $htmlIdFormatterFactory, EntityIdFormatterFactory $plainTextIdFormatterFactory, HtmlSnakFormatterFactory $htmlSnakFormatterFactory, StatementGrouper $statementGrouper, PropertyOrderProvider $propertyOrderProvider, SiteLookup $siteLookup, DataTypeFactory $dataTypeFactory, TemplateFactory $templateFactory, LanguageNameLookupFactory $languageNameLookupFactory, LanguageDirectionalityLookup $languageDirectionalityLookup, NumberLocalizerFactory $numberLocalizerFactory, array $siteLinkGroups, array $specialSiteLinkGroups, array $badgeItems, LocalizedTextProviderFactory $textProviderFactory, SpecialPageLinker $specialPageLinker, LanguageFactory $languageFactory)
 
 newItemView (Language $language, TermLanguageFallbackChain $termFallbackChain, CacheableEntityTermsView $entityTermsView)
 Creates an ItemView suitable for rendering the item.
 
 newPropertyView (Language $language, TermLanguageFallbackChain $termFallbackChain, CacheableEntityTermsView $entityTermsView)
 Creates an PropertyView suitable for rendering the property.
 
 newStatementSectionsView ( $languageCode, TermLanguageFallbackChain $termFallbackChain, EditSectionGenerator $editSectionGenerator)
 
 newStatementGroupListView ( $languageCode, TermLanguageFallbackChain $termFallbackChain, EditSectionGenerator $editSectionGenerator)
 

Private Member Functions

 hasValidOutputFormat (EntityIdFormatterFactory $factory, $expected)
 
 newToolbarEditSectionGenerator (LocalizedTextProvider $textProvider)
 

Private Attributes

 $htmlSnakFormatterFactory
 
 $htmlIdFormatterFactory
 
 $plainTextIdFormatterFactory
 
 $statementGrouper
 
 $propertyOrderProvider
 
 $siteLookup
 
 $dataTypeFactory
 
 $templateFactory
 
 $languageNameLookupFactory
 
 $languageDirectionalityLookup
 
 $siteLinkGroups
 
 $specialSiteLinkGroups
 
 $badgeItems
 
 $specialPageLinker
 
 $numberLocalizerFactory
 
 $textProviderFactory
 
 $languageFactory
 

Detailed Description

This is a basic factory to create views for DataModel objects.

It contains all dependencies of the views besides request-specific options. Those are required in the parameters.

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Thiemo Kreuz
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\ViewFactory::__construct ( EntityIdFormatterFactory $htmlIdFormatterFactory,
EntityIdFormatterFactory $plainTextIdFormatterFactory,
HtmlSnakFormatterFactory $htmlSnakFormatterFactory,
StatementGrouper $statementGrouper,
PropertyOrderProvider $propertyOrderProvider,
SiteLookup $siteLookup,
DataTypeFactory $dataTypeFactory,
TemplateFactory $templateFactory,
LanguageNameLookupFactory $languageNameLookupFactory,
LanguageDirectionalityLookup $languageDirectionalityLookup,
NumberLocalizerFactory $numberLocalizerFactory,
array $siteLinkGroups,
array $specialSiteLinkGroups,
array $badgeItems,
LocalizedTextProviderFactory $textProviderFactory,
SpecialPageLinker $specialPageLinker,
LanguageFactory $languageFactory )
Parameters
EntityIdFormatterFactory$htmlIdFormatterFactory
EntityIdFormatterFactory$plainTextIdFormatterFactory
HtmlSnakFormatterFactory$htmlSnakFormatterFactory
StatementGrouper$statementGrouper
PropertyOrderProvider$propertyOrderProvider
SiteLookup$siteLookup
DataTypeFactory$dataTypeFactory
TemplateFactory$templateFactory
LanguageNameLookupFactory$languageNameLookupFactory
LanguageDirectionalityLookup$languageDirectionalityLookup
NumberLocalizerFactory$numberLocalizerFactory
string[]$siteLinkGroups
string[]$specialSiteLinkGroups
string[]$badgeItems
LocalizedTextProviderFactory$textProviderFactory
SpecialPageLinker$specialPageLinker
LanguageFactory$languageFactory
Exceptions
InvalidArgumentException

Member Function Documentation

◆ hasValidOutputFormat()

Wikibase\View\ViewFactory::hasValidOutputFormat ( EntityIdFormatterFactory $factory,
$expected )
private
Parameters
EntityIdFormatterFactory$factory
string$expected
Returns
bool

◆ newItemView()

Wikibase\View\ViewFactory::newItemView ( Language $language,
TermLanguageFallbackChain $termFallbackChain,
CacheableEntityTermsView $entityTermsView )

Creates an ItemView suitable for rendering the item.

Parameters
Language$language
TermLanguageFallbackChain$termFallbackChain
CacheableEntityTermsView$entityTermsView
Returns
ItemView

◆ newPropertyView()

Wikibase\View\ViewFactory::newPropertyView ( Language $language,
TermLanguageFallbackChain $termFallbackChain,
CacheableEntityTermsView $entityTermsView )

Creates an PropertyView suitable for rendering the property.

Parameters
Language$language
TermLanguageFallbackChain$termFallbackChain
CacheableEntityTermsView$entityTermsView
Returns
PropertyView

◆ newStatementGroupListView()

Wikibase\View\ViewFactory::newStatementGroupListView ( $languageCode,
TermLanguageFallbackChain $termFallbackChain,
EditSectionGenerator $editSectionGenerator )
Parameters
string$languageCode
TermLanguageFallbackChain$termFallbackChain
EditSectionGenerator$editSectionGenerator
Returns
StatementGroupListView

◆ newStatementSectionsView()

Wikibase\View\ViewFactory::newStatementSectionsView ( $languageCode,
TermLanguageFallbackChain $termFallbackChain,
EditSectionGenerator $editSectionGenerator )
Parameters
string$languageCode
TermLanguageFallbackChain$termFallbackChain
EditSectionGenerator$editSectionGenerator
Returns
StatementSectionsView

◆ newToolbarEditSectionGenerator()

Wikibase\View\ViewFactory::newToolbarEditSectionGenerator ( LocalizedTextProvider $textProvider)
private

Member Data Documentation

◆ $badgeItems

Wikibase\View\ViewFactory::$badgeItems
private

◆ $dataTypeFactory

Wikibase\View\ViewFactory::$dataTypeFactory
private

◆ $htmlIdFormatterFactory

Wikibase\View\ViewFactory::$htmlIdFormatterFactory
private

◆ $htmlSnakFormatterFactory

Wikibase\View\ViewFactory::$htmlSnakFormatterFactory
private

◆ $languageDirectionalityLookup

Wikibase\View\ViewFactory::$languageDirectionalityLookup
private

◆ $languageFactory

Wikibase\View\ViewFactory::$languageFactory
private

◆ $languageNameLookupFactory

Wikibase\View\ViewFactory::$languageNameLookupFactory
private

◆ $numberLocalizerFactory

Wikibase\View\ViewFactory::$numberLocalizerFactory
private

◆ $plainTextIdFormatterFactory

Wikibase\View\ViewFactory::$plainTextIdFormatterFactory
private

◆ $propertyOrderProvider

Wikibase\View\ViewFactory::$propertyOrderProvider
private

◆ $siteLinkGroups

Wikibase\View\ViewFactory::$siteLinkGroups
private

◆ $siteLookup

Wikibase\View\ViewFactory::$siteLookup
private

◆ $specialPageLinker

Wikibase\View\ViewFactory::$specialPageLinker
private

◆ $specialSiteLinkGroups

Wikibase\View\ViewFactory::$specialSiteLinkGroups
private

◆ $statementGrouper

Wikibase\View\ViewFactory::$statementGrouper
private

◆ $templateFactory

Wikibase\View\ViewFactory::$templateFactory
private

◆ $textProviderFactory

Wikibase\View\ViewFactory::$textProviderFactory
private

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