Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Hooks\WikibaseClientSiteLinksForItemHook Interface Reference

This is a hook handler interface, see docs/Hooks.md in MediaWiki core. More...

+ Inheritance diagram for Wikibase\Client\Hooks\WikibaseClientSiteLinksForItemHook:

Public Member Functions

 onWikibaseClientSiteLinksForItem (Item $item, array &$siteLinks, UsageAccumulator $usageAccumulator)
 Called by Wikibase::Client::Hooks::SiteLinksForDisplayLookup to allow altering the sitelinks used in language links and the other project's sidebar.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md in MediaWiki core.

Use the hook name "WikibaseClientSiteLinksForItem" to register handlers implementing this interface.

Member Function Documentation

◆ onWikibaseClientSiteLinksForItem()

Wikibase\Client\Hooks\WikibaseClientSiteLinksForItemHook::onWikibaseClientSiteLinksForItem ( Item $item,
array & $siteLinks,
UsageAccumulator $usageAccumulator )

Called by Wikibase::Client::Hooks::SiteLinksForDisplayLookup to allow altering the sitelinks used in language links and the other project's sidebar.

Only called in case the page we are on is linked with an item.

Parameters
Item$itemItem the page is linked with.
SiteLink[]&$siteLinksArray containing the site links to display indexed by site global ID.
UsageAccumulator$usageAccumulatorA usage accumulator to track the usages of Wikibase entities done by the hook handlers.

Implemented in Wikibase\Client\Hooks\WikibaseClientHookRunner.


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