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

A formatter for exclusive use on client wikis. More...

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

Public Member Functions

 __construct (EntityTitleLookup $entityTitleLookup, LabelDescriptionLookup $labelLookup)
 
 formatEntityId (EntityId $entityId)
 

Private Attributes

 $entityTitleLookup
 
 $labelLookup
 

Detailed Description

A formatter for exclusive use on client wikis.

It expects an entity ID and returns a wikitext snippet, containing a link to a local page as specified by the relevant sitelink, labeled with the label in the local (or a fallback) language. Both the sitelink and the label are optional.

Author
Thiemo Kreuz

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Formatters\EntityIdSiteLinkFormatter::__construct ( EntityTitleLookup  $entityTitleLookup,
LabelDescriptionLookup  $labelLookup 
)

Member Function Documentation

◆ formatEntityId()

Wikibase\Lib\Formatters\EntityIdSiteLinkFormatter::formatEntityId ( EntityId  $entityId)
See also
EntityIdFormatter::formatEntityId
Parameters
EntityId$entityId
Returns
string Wikitext

Implements Wikibase\DataModel\Services\EntityId\EntityIdFormatter.

Member Data Documentation

◆ $entityTitleLookup

Wikibase\Lib\Formatters\EntityIdSiteLinkFormatter::$entityTitleLookup
private

◆ $labelLookup

Wikibase\Lib\Formatters\EntityIdSiteLinkFormatter::$labelLookup
private

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