Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Diff\DifferencesSnakVisualizer Class Reference

Visualizes Snaks for difference views. More...

Public Member Functions

 __construct (EntityIdFormatter $propertyIdFormatter, SnakFormatter $snakDetailsFormatter, SnakFormatter $snakBreadCrumbFormatter, $languageCode)
 
 getDetailedValue (Snak $snak=null)
 
 getPropertyHeader (Snak $snak=null)
 Get formatted header for a snak, including the snak's property label, but not the snak's value.
 
 getPropertyAndValueHeader (Snak $snak)
 Get formatted header for a snak, including the snak's property label and value.
 
 getPropertyAndDetailedValue (Snak $snak)
 Get a detailed formatted snak, including the snak's property label and value.
 

Private Member Functions

 formatPropertyId (EntityId $entityId)
 
 getColonSeparatedHtml ( $before, $after)
 

Private Attributes

 $languageCode
 
 $propertyIdFormatter
 
 $snakBreadCrumbFormatter
 
 $snakDetailsFormatter
 

Detailed Description

Visualizes Snaks for difference views.

Author
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::__construct ( EntityIdFormatter $propertyIdFormatter,
SnakFormatter $snakDetailsFormatter,
SnakFormatter $snakBreadCrumbFormatter,
$languageCode )
Parameters
EntityIdFormatter$propertyIdFormatterFormatter for IDs, must generate HTML.
SnakFormatter$snakDetailsFormatterdetailed Formatter for Snaks, must generate HTML.
SnakFormatter$snakBreadCrumbFormatterterse Formatter for Snaks, must generate HTML.
string$languageCode
Exceptions
InvalidArgumentException

Member Function Documentation

◆ formatPropertyId()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::formatPropertyId ( EntityId $entityId)
private
Parameters
EntityId$entityId
Returns
string HTML

◆ getColonSeparatedHtml()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::getColonSeparatedHtml ( $before,
$after )
private
Parameters
string$beforeHTML
string$afterHTML
Returns
string HTML

◆ getDetailedValue()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::getDetailedValue ( Snak $snak = null)
Parameters
Snak | null$snak
Returns
string|null HTML

◆ getPropertyAndDetailedValue()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::getPropertyAndDetailedValue ( Snak $snak)

Get a detailed formatted snak, including the snak's property label and value.

Parameters
Snak$snak
Returns
string HTML

◆ getPropertyAndValueHeader()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::getPropertyAndValueHeader ( Snak $snak)

Get formatted header for a snak, including the snak's property label and value.

Parameters
Snak$snak
Returns
string HTML

◆ getPropertyHeader()

Wikibase\Repo\Diff\DifferencesSnakVisualizer::getPropertyHeader ( Snak $snak = null)

Get formatted header for a snak, including the snak's property label, but not the snak's value.

Parameters
Snak | null$snak
Returns
string HTML

Member Data Documentation

◆ $languageCode

Wikibase\Repo\Diff\DifferencesSnakVisualizer::$languageCode
private

◆ $propertyIdFormatter

Wikibase\Repo\Diff\DifferencesSnakVisualizer::$propertyIdFormatter
private

◆ $snakBreadCrumbFormatter

Wikibase\Repo\Diff\DifferencesSnakVisualizer::$snakBreadCrumbFormatter
private

◆ $snakDetailsFormatter

Wikibase\Repo\Diff\DifferencesSnakVisualizer::$snakDetailsFormatter
private

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