Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter Class Reference

DispatchingEntityIdHtmlLinkFormatter is a formatter for EntityId Html Links. More...

+ Inheritance diagram for Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter:
+ Collaboration diagram for Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter:

Public Member Functions

 __construct (array $formatters, EntityIdFormatter $defaultFormatter)
 
 formatEntityId (EntityId $entityId)
 

Private Attributes

 $formatters
 
 $defaultFormatter
 

Detailed Description

DispatchingEntityIdHtmlLinkFormatter is a formatter for EntityId Html Links.

It dispatches the formatter based on the entity type

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter::__construct ( array  $formatters,
EntityIdFormatter  $defaultFormatter 
)
Parameters
EntityIdFormatter[]$formatters
EntityIdFormatter$defaultFormatter

Member Function Documentation

◆ formatEntityId()

Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter::formatEntityId ( EntityId  $entityId)
Parameters
EntityId$entityId
Returns
string HTML

Implements Wikibase\DataModel\Services\EntityId\EntityIdFormatter.

Member Data Documentation

◆ $defaultFormatter

Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter::$defaultFormatter
private

◆ $formatters

Wikibase\Lib\Formatters\DispatchingEntityIdHtmlLinkFormatter::$formatters
private

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