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

Class for creating views for Property instances. More...

+ Inheritance diagram for Wikibase\View\PropertyView:
+ Collaboration diagram for Wikibase\View\PropertyView:

Public Member Functions

 __construct (TemplateFactory $templateFactory, CacheableEntityTermsView $entityTermsView, LanguageDirectionalityLookup $languageDirectionalityLookup, StatementSectionsView $statementSectionsView, DataTypeFactory $dataTypeFactory, $languageCode, LocalizedTextProvider $textProvider)
 
 getTitleHtml (EntityDocument $entity)
 Returns the html used for the title of the page.
See also
ParserOutput::setDisplayTitle
Parameters
EntityDocument$entity
Returns
string HTML

 
 getContent (EntityDocument $entity, $revision)
 Builds and returns the main content representing a whole WikibaseEntity.
 
- Public Member Functions inherited from Wikibase\View\EntityView
 __construct (TemplateFactory $templateFactory, LanguageDirectionalityLookup $languageDirectionalityLookup, $languageCode)
 

Protected Member Functions

 getMainHtml (EntityDocument $property)
 
 getSideHtml (EntityDocument $entity)
 
- Protected Member Functions inherited from Wikibase\View\EntityView
 renderEntityView (EntityDocument $entity)
 

Private Member Functions

 getHtmlForDataType ( $propertyType)
 Builds and returns the HTML representing a property entity's data type information.
 
 getHtmlForTerms (EntityDocument $entity)
 Builds and returns the HTML for the entity's fingerprint.
 

Private Attributes

 $statementSectionsView
 
 $dataTypeFactory
 
 $textProvider
 
 $entityTermsView
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\View\EntityView
 $templateFactory
 
 $languageCode
 

Detailed Description

Class for creating views for Property instances.

For the Property this basically is what the Parser is for WikitextContent.

Author
Daniel Werner
H. Snater < media.nosp@m.wiki.nosp@m.@snat.nosp@m.er.c.nosp@m.om >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\PropertyView::__construct ( TemplateFactory $templateFactory,
CacheableEntityTermsView $entityTermsView,
LanguageDirectionalityLookup $languageDirectionalityLookup,
StatementSectionsView $statementSectionsView,
DataTypeFactory $dataTypeFactory,
$languageCode,
LocalizedTextProvider $textProvider )
See also
EntityView::__construct
Parameters
TemplateFactory$templateFactory
CacheableEntityTermsView$entityTermsView
LanguageDirectionalityLookup$languageDirectionalityLookup
StatementSectionsView$statementSectionsView
DataTypeFactory$dataTypeFactory
string$languageCode
LocalizedTextProvider$textProvider

Member Function Documentation

◆ getContent()

Wikibase\View\PropertyView::getContent ( EntityDocument $entity,
$revision )

Builds and returns the main content representing a whole WikibaseEntity.

Parameters
EntityDocument$entitythe entity to render
int$revisionThe revision of the entity to render
Returns
ViewContent

Implements Wikibase\View\EntityDocumentView.

◆ getHtmlForDataType()

Wikibase\View\PropertyView::getHtmlForDataType ( $propertyType)
private

Builds and returns the HTML representing a property entity's data type information.

Parameters
string$propertyType
Returns
string HTML

◆ getHtmlForTerms()

Wikibase\View\PropertyView::getHtmlForTerms ( EntityDocument $entity)
private

Builds and returns the HTML for the entity's fingerprint.

Parameters
EntityDocument$entity
Returns
string HTML

◆ getMainHtml()

Wikibase\View\PropertyView::getMainHtml ( EntityDocument $property)
protected
See also
EntityView::getMainHtml
Parameters
EntityDocument$property
Exceptions
InvalidArgumentException
Returns
string HTML

Reimplemented from Wikibase\View\EntityView.

◆ getSideHtml()

Wikibase\View\PropertyView::getSideHtml ( EntityDocument $entity)
protected
See also
EntityView::getSideHtml
Parameters
EntityDocument$entity
Returns
string HTML

Reimplemented from Wikibase\View\EntityView.

◆ getTitleHtml()

Wikibase\View\PropertyView::getTitleHtml ( EntityDocument $entity)

Returns the html used for the title of the page.

See also
ParserOutput::setDisplayTitle
Parameters
EntityDocument$entity
Returns
string HTML

Reimplemented from Wikibase\View\EntityView.

Member Data Documentation

◆ $dataTypeFactory

Wikibase\View\PropertyView::$dataTypeFactory
private

◆ $entityTermsView

Wikibase\View\PropertyView::$entityTermsView
private

◆ $statementSectionsView

Wikibase\View\PropertyView::$statementSectionsView
private

◆ $textProvider

Wikibase\View\PropertyView::$textProvider
private

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