Wikibase
MediaWiki Wikibase extension
Wikibase\View\ItemView Class Reference

Class for creating views for Item instances. More...

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

Public Member Functions

 __construct (TemplateFactory $templateFactory, CacheableEntityTermsView $entityTermsView, LanguageDirectionalityLookup $languageDirectionalityLookup, StatementSectionsView $statementSectionsView, $languageCode, SiteLinksView $siteLinksView, array $siteLinkGroups, 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
PhanUndeclaredMethod Phan is confused by intersection types More...
 
 getContent (EntityDocument $entity, $revision)
 Builds and returns the main content representing a whole WikibaseEntity. More...
 
- Public Member Functions inherited from Wikibase\View\EntityView
 __construct (TemplateFactory $templateFactory, LanguageDirectionalityLookup $languageDirectionalityLookup, $languageCode)
 

Protected Member Functions

 getMainHtml (EntityDocument $item)
 
 getSideHtml (EntityDocument $entity)
 
 getHtmlForTerms (EntityDocument $entity)
 Builds and returns the HTML for the entity's fingerprint. More...
 
- Protected Member Functions inherited from Wikibase\View\EntityView
 renderEntityView (EntityDocument $entity)
 

Private Member Functions

 getHtmlForSiteLinks (Item $item)
 Builds and returns the HTML representing a WikibaseEntity's site-links. More...
 
 getHtmlForPageImage ()
 Builds and returns the HTML representing a WikibaseEntity's page image. More...
 

Private Attributes

 $statementSectionsView
 
 $siteLinksView
 
 $siteLinkGroups
 
 $textProvider
 
 $entityTermsView
 

Additional Inherited Members

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

Detailed Description

Class for creating views for Item instances.

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

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

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\ItemView::__construct ( TemplateFactory  $templateFactory,
CacheableEntityTermsView  $entityTermsView,
LanguageDirectionalityLookup  $languageDirectionalityLookup,
StatementSectionsView  $statementSectionsView,
  $languageCode,
SiteLinksView  $siteLinksView,
array  $siteLinkGroups,
LocalizedTextProvider  $textProvider 
)
See also
EntityView::__construct
Parameters
TemplateFactory$templateFactory
CacheableEntityTermsView$entityTermsView
LanguageDirectionalityLookup$languageDirectionalityLookup
StatementSectionsView$statementSectionsView
string$languageCode
SiteLinksView$siteLinksView
string[]$siteLinkGroups
LocalizedTextProvider$textProvider

Member Function Documentation

◆ getContent()

Wikibase\View\ItemView::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.

◆ getHtmlForPageImage()

Wikibase\View\ItemView::getHtmlForPageImage ( )
private

Builds and returns the HTML representing a WikibaseEntity's page image.

Returns
string

◆ getHtmlForSiteLinks()

Wikibase\View\ItemView::getHtmlForSiteLinks ( Item  $item)
private

Builds and returns the HTML representing a WikibaseEntity's site-links.

Parameters
Item$itemthe entity to render
Returns
string HTML

◆ getHtmlForTerms()

Wikibase\View\ItemView::getHtmlForTerms ( EntityDocument  $entity)
protected

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

Parameters
EntityDocument$entity
Returns
string HTML PhanUndeclaredMethod Phan is confused by intersection types

◆ getMainHtml()

Wikibase\View\ItemView::getMainHtml ( EntityDocument  $item)
protected
See also
EntityView::getMainHtml
Parameters
EntityDocument$item
Exceptions
InvalidArgumentException
Returns
string HTML PhanTypeMismatchArgument

Reimplemented from Wikibase\View\EntityView.

◆ getSideHtml()

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

Reimplemented from Wikibase\View\EntityView.

◆ getTitleHtml()

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

Returns the html used for the title of the page.

See also
ParserOutput::setDisplayTitle
Parameters
EntityDocument$entity
Returns
string HTML
PhanUndeclaredMethod Phan is confused by intersection types

Reimplemented from Wikibase\View\EntityView.

Member Data Documentation

◆ $entityTermsView

Wikibase\View\ItemView::$entityTermsView
private

◆ $siteLinkGroups

Wikibase\View\ItemView::$siteLinkGroups
private

◆ $siteLinksView

Wikibase\View\ItemView::$siteLinksView
private

◆ $statementSectionsView

Wikibase\View\ItemView::$statementSectionsView
private

◆ $textProvider

Wikibase\View\ItemView::$textProvider
private

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