Extension:Wikibase Client/Hooks/WikibaseClientSiteLinksForItem

WikibaseClientSiteLinksForItem
Available from version ???
Allow extensions to add more site links based on e.g. statements or connected entities
Define function:
public static function onWikibaseClientSiteLinksForItem( Wikibase\DataModel\Entity\Item $item, array &$siteLinks, c $usageAccumulator ) { ... }
Attach hook:
$wgHooks['WikibaseClientSiteLinksForItem'][] = 'MyExtensionHooks::onWikibaseClientSiteLinksForItem';
Called from:File(s): Wikibase Client / includes/Hooks/SiteLinksForDisplayLookup.php
Function(s): getSiteLinksForItem

For more information about attaching hooks, see Manual:Hooks .
For examples of other extensions using this hook, see Category:WikibaseClientSiteLinksForItem extensions.

Parameters

edit
  • $item: An instance of Wikibase\DataModel\Entity\Item
  • &$siteLinks: A modifiable array of Wikibase\DataModel\SiteLink (Wikibase\DataModel\SiteLink[])
  • $usageAccumulator: An instance of Wikibase\DataModel\SiteLink