Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Hooks\SiteLinksForDisplayLookup Class Reference

Returns the site links to display in the navigation areas of the client UI. More...

Public Member Functions

 __construct (SiteLinkLookup $siteLinkLookup, EntityLookup $entityLookup, UsageAccumulator $usageAccumulator, HookContainer $hookContainer, LoggerInterface $logger, string $siteId)
 
 getSiteLinksForPageTitle (Title $title)
 Finds the corresponding item on the repository and returns the item's site links to display in the UI.
 
 getSiteLinksForItemId (ItemId $itemId)
 Returns the item's site links to display in the UI.
 

Private Member Functions

 getSiteLinksForItem (Item $item)
 

Private Attributes

 $siteLinkLookup
 
 $entityLookup
 
 $usageAccumulator
 
 $hookContainer
 
 $logger
 
 $siteId
 

Detailed Description

Returns the site links to display in the navigation areas of the client UI.

Author
Thomas Pellissier Tanon

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::__construct ( SiteLinkLookup $siteLinkLookup,
EntityLookup $entityLookup,
UsageAccumulator $usageAccumulator,
HookContainer $hookContainer,
LoggerInterface $logger,
string $siteId )
Parameters
SiteLinkLookup$siteLinkLookup
EntityLookup$entityLookup
UsageAccumulator$usageAccumulator
HookContainer$hookContainer
LoggerInterface$logger
string$siteIdThe global site ID for the local wiki

Member Function Documentation

◆ getSiteLinksForItem()

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::getSiteLinksForItem ( Item $item)
private

◆ getSiteLinksForItemId()

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::getSiteLinksForItemId ( ItemId $itemId)

Returns the item's site links to display in the UI.

Runs the WikibaseClientSiteLinksForItem hook to allow extensions to add more site links based on e.g. statements or connected entities.

Parameters
ItemId$itemId
Returns
SiteLink[] A map of SiteLinks, indexed by global site id.

◆ getSiteLinksForPageTitle()

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::getSiteLinksForPageTitle ( Title $title)

Finds the corresponding item on the repository and returns the item's site links to display in the UI.

Runs the WikibaseClientSiteLinksForItem hook to allow extensions to add more site links based on e.g. statements or connected entities.

Parameters
Title$title
Returns
SiteLink[] A map of SiteLinks, indexed by global site id.

Member Data Documentation

◆ $entityLookup

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::$entityLookup
private

◆ $hookContainer

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::$hookContainer
private

◆ $logger

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::$logger
private

◆ $siteId

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::$siteId
private

◆ $siteLinkLookup

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::$siteLinkLookup
private

◆ $usageAccumulator

Wikibase\Client\Hooks\SiteLinksForDisplayLookup::$usageAccumulator
private

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