Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory Class Reference

Public Member Functions

 __construct (EntityTitleTextLookup $entityTitleTextLookup, LanguageFactory $languageFactory, array $callbacks)
 
 getLinkFormatter (string $entityType, Language $language)
 
 getDefaultLinkFormatter (Language $language)
 

Private Member Functions

 getOrCreateLinkFormatter (string $type, Language $language)
 
 createAndCacheLinkFormatter (string $type, Language $language)
 

Private Attributes

 $callbacks
 
 $cachedLinkFormatters = []
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::__construct ( EntityTitleTextLookup $entityTitleTextLookup,
LanguageFactory $languageFactory,
array $callbacks )
Parameters
EntityTitleTextLookup$entityTitleTextLookup
LanguageFactory$languageFactory
callable[]$callbacksmaps entity type strings to callbacks returning LinkFormatter

Member Function Documentation

◆ createAndCacheLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::createAndCacheLinkFormatter ( string $type,
Language $language )
private

◆ getDefaultLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::getDefaultLinkFormatter ( Language $language)

◆ getLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::getLinkFormatter ( string $entityType,
Language $language )

◆ getOrCreateLinkFormatter()

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::getOrCreateLinkFormatter ( string $type,
Language $language )
private

Member Data Documentation

◆ $cachedLinkFormatters

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::$cachedLinkFormatters = []
private

◆ $callbacks

Wikibase\Repo\Hooks\Formatters\EntityLinkFormatterFactory::$callbacks
private

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