Wikibase
MediaWiki Wikibase extension
Wikibase\View\EntityView Class Reference

Base class for creating views for all different kinds of Wikibase\DataModel\Entity\EntityDocument. More...

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

Public Member Functions

 __construct (TemplateFactory $templateFactory, LanguageDirectionalityLookup $languageDirectionalityLookup, $languageCode)
 
 getTitleHtml (EntityDocument $entity)
 Returns the html used for the title of the page. More...
 
- Public Member Functions inherited from Wikibase\View\EntityDocumentView
 getContent (EntityDocument $entity, $revision)
 Builds and returns the HTML representing a whole WikibaseEntity. More...
 

Protected Member Functions

 renderEntityView (EntityDocument $entity)
 
 getMainHtml (EntityDocument $entity)
 Builds and returns the HTML to be put into the main container of an entity's HTML structure. More...
 
 getSideHtml (EntityDocument $entity)
 Builds and Returns HTML to put into the sidebar of the entity's HTML structure. More...
 

Protected Attributes

 $templateFactory
 
 $languageCode
 

Private Attributes

 $languageDirectionalityLookup
 

Detailed Description

Base class for creating views for all different kinds of Wikibase\DataModel\Entity\EntityDocument.

If you want a simple interface instead see EntityDocumentView.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\EntityView::__construct ( TemplateFactory  $templateFactory,
LanguageDirectionalityLookup  $languageDirectionalityLookup,
  $languageCode 
)
Parameters
TemplateFactory$templateFactory
LanguageDirectionalityLookup$languageDirectionalityLookup
string$languageCode

Member Function Documentation

◆ getMainHtml()

Wikibase\View\EntityView::getMainHtml ( EntityDocument  $entity)
abstractprotected

Builds and returns the HTML to be put into the main container of an entity's HTML structure.

Parameters
EntityDocument$entity
Returns
string HTML

Reimplemented in Wikibase\View\PropertyView, and Wikibase\View\ItemView.

◆ getSideHtml()

Wikibase\View\EntityView::getSideHtml ( EntityDocument  $entity)
abstractprotected

Builds and Returns HTML to put into the sidebar of the entity's HTML structure.

Parameters
EntityDocument$entity
Returns
string HTML

Reimplemented in Wikibase\View\PropertyView, and Wikibase\View\ItemView.

◆ getTitleHtml()

Wikibase\View\EntityView::getTitleHtml ( EntityDocument  $entity)
abstract

Returns the html used for the title of the page.

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

Implements Wikibase\View\EntityDocumentView.

Reimplemented in Wikibase\View\PropertyView, and Wikibase\View\ItemView.

◆ renderEntityView()

Wikibase\View\EntityView::renderEntityView ( EntityDocument  $entity)
protected

Member Data Documentation

◆ $languageCode

Wikibase\View\EntityView::$languageCode
protected

◆ $languageDirectionalityLookup

Wikibase\View\EntityView::$languageDirectionalityLookup
private

◆ $templateFactory

Wikibase\View\EntityView::$templateFactory
protected

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