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

Generates HTML to display statements. More...

Public Member Functions

 __construct (PropertyOrderProvider $propertyOrderProvider, TemplateFactory $templateFactory, EntityIdFormatter $propertyIdFormatter, EditSectionGenerator $sectionEditLinkGenerator, StatementHtmlGenerator $statementHtmlGenerator)
 
 getHtml (array $statements, $idPrefix='')
 Builds and returns the HTML representing a WikibaseEntity's statements.
 

Public Attributes

const ID_PREFIX_SEPARATOR = '-'
 

Private Member Functions

 groupStatementsByProperties (array $statements)
 
 orderStatementsByPropertyOrder (array $statementsByProperty)
 
 getHtmlForStatementGroupView (array $statements, $prefix)
 
 getHtmlForStatementListView (array $statements, $addStatementHtml)
 

Private Attributes

 $propertyOrderProvider
 
 $templateFactory
 
 $propertyIdFormatter
 
 $editSectionGenerator
 
 $statementHtmlGenerator
 

Detailed Description

Generates HTML to display statements.

Author
Bene* < benes.nosp@m.tar..nosp@m.wikim.nosp@m.edia.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\StatementGroupListView::__construct ( PropertyOrderProvider $propertyOrderProvider,
TemplateFactory $templateFactory,
EntityIdFormatter $propertyIdFormatter,
EditSectionGenerator $sectionEditLinkGenerator,
StatementHtmlGenerator $statementHtmlGenerator )

Member Function Documentation

◆ getHtml()

Wikibase\View\StatementGroupListView::getHtml ( array $statements,
$idPrefix = '' )

Builds and returns the HTML representing a WikibaseEntity's statements.

Parameters
Statement[]$statements
string$idPrefixoptional prefix for statement group ids
Returns
string HTML

◆ getHtmlForStatementGroupView()

Wikibase\View\StatementGroupListView::getHtmlForStatementGroupView ( array $statements,
$prefix )
private
Parameters
Statement[]$statements
string$prefix
Returns
string HTML

◆ getHtmlForStatementListView()

Wikibase\View\StatementGroupListView::getHtmlForStatementListView ( array $statements,
$addStatementHtml )
private
Parameters
Statement[]$statements
string$addStatementHtml
Returns
string HTML

◆ groupStatementsByProperties()

Wikibase\View\StatementGroupListView::groupStatementsByProperties ( array $statements)
private
Parameters
Statement[]$statements
Returns
array[]

◆ orderStatementsByPropertyOrder()

Wikibase\View\StatementGroupListView::orderStatementsByPropertyOrder ( array $statementsByProperty)
private
Parameters
array[]$statementsByPropertyThe array keys are expected to be Property ID serializations.
Returns
array[]

Member Data Documentation

◆ $editSectionGenerator

Wikibase\View\StatementGroupListView::$editSectionGenerator
private

◆ $propertyIdFormatter

Wikibase\View\StatementGroupListView::$propertyIdFormatter
private

◆ $propertyOrderProvider

Wikibase\View\StatementGroupListView::$propertyOrderProvider
private

◆ $statementHtmlGenerator

Wikibase\View\StatementGroupListView::$statementHtmlGenerator
private

◆ $templateFactory

Wikibase\View\StatementGroupListView::$templateFactory
private

◆ ID_PREFIX_SEPARATOR

const Wikibase\View\StatementGroupListView::ID_PREFIX_SEPARATOR = '-'

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