Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Hooks\InfoActionHookHandler Class Reference
+ Inheritance diagram for Wikibase\Client\Hooks\InfoActionHookHandler:
+ Collaboration diagram for Wikibase\Client\Hooks\InfoActionHookHandler:

Public Member Functions

 __construct (NamespaceChecker $namespaceChecker, RepoLinker $repoLinker, SiteLinkLookup $siteLinkLookup, $siteId, UsageLookup $usageLookup, FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, DescriptionLookup $descriptionLookup)
 
 onInfoAction ( $context, &$pageInfo)
 Adds the Entity ID of the corresponding Wikidata item in action=info.
 

Static Public Member Functions

static factory (DescriptionLookup $descriptionLookup, FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, NamespaceChecker $namespaceChecker, RepoLinker $repoLinker, SettingsArray $clientSettings, ClientStore $store)
 

Private Member Functions

 getPageInfoRow (IContextSource $context, Title $title)
 
 getDescriptionInfoRow ( $context, $description, $source)
 
 getItemPageInfo (IContextSource $context, ItemId $itemId)
 Creating a Repo link with Item ID as anchor text.
 
 getUnconnectedItemPageInfo (IContextSource $context)
 
 formatAspects (array $aspects, IContextSource $context)
 
 formatEntityUsage (array $usages, IContextSource $context)
 

Private Attributes

 $namespaceChecker
 
 $repoLinker
 
 $siteLinkLookup
 
 $siteId
 
 $usageLookup
 
 $labelDescriptionLookupFactory
 
 $descriptionLookup
 

Detailed Description

Author
Katie Filbert < aude..nosp@m.wiki.nosp@m.@gmai.nosp@m.l.co.nosp@m.m >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Hooks\InfoActionHookHandler::__construct ( NamespaceChecker $namespaceChecker,
RepoLinker $repoLinker,
SiteLinkLookup $siteLinkLookup,
$siteId,
UsageLookup $usageLookup,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
DescriptionLookup $descriptionLookup )

Member Function Documentation

◆ factory()

static Wikibase\Client\Hooks\InfoActionHookHandler::factory ( DescriptionLookup $descriptionLookup,
FallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory,
NamespaceChecker $namespaceChecker,
RepoLinker $repoLinker,
SettingsArray $clientSettings,
ClientStore $store )
static

◆ formatAspects()

Wikibase\Client\Hooks\InfoActionHookHandler::formatAspects ( array $aspects,
IContextSource $context )
private
Parameters
array[]$aspects
IContextSource$context
Returns
string

◆ formatEntityUsage()

Wikibase\Client\Hooks\InfoActionHookHandler::formatEntityUsage ( array $usages,
IContextSource $context )
private
Parameters
EntityUsage[]$usages
IContextSource$context
Returns
string[]

◆ getDescriptionInfoRow()

Wikibase\Client\Hooks\InfoActionHookHandler::getDescriptionInfoRow ( $context,
$description,
$source )
private
Parameters
IContextSource$context
string$description
string$source
Returns
string[]

◆ getItemPageInfo()

Wikibase\Client\Hooks\InfoActionHookHandler::getItemPageInfo ( IContextSource $context,
ItemId $itemId )
private

Creating a Repo link with Item ID as anchor text.

Parameters
IContextSource$context
ItemId$itemId
Returns
string[]

◆ getPageInfoRow()

Wikibase\Client\Hooks\InfoActionHookHandler::getPageInfoRow ( IContextSource $context,
Title $title )
private
Parameters
IContextSource$context
Title$title
Returns
string[]

◆ getUnconnectedItemPageInfo()

Wikibase\Client\Hooks\InfoActionHookHandler::getUnconnectedItemPageInfo ( IContextSource $context)
private
Parameters
IContextSource$context
Returns
string[]

◆ onInfoAction()

Wikibase\Client\Hooks\InfoActionHookHandler::onInfoAction ( $context,
& $pageInfo )

Adds the Entity ID of the corresponding Wikidata item in action=info.

Parameters
IContextSource$context
array[]&$pageInfo

Member Data Documentation

◆ $descriptionLookup

Wikibase\Client\Hooks\InfoActionHookHandler::$descriptionLookup
private

◆ $labelDescriptionLookupFactory

Wikibase\Client\Hooks\InfoActionHookHandler::$labelDescriptionLookupFactory
private

◆ $namespaceChecker

Wikibase\Client\Hooks\InfoActionHookHandler::$namespaceChecker
private

◆ $repoLinker

Wikibase\Client\Hooks\InfoActionHookHandler::$repoLinker
private

◆ $siteId

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

◆ $siteLinkLookup

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

◆ $usageLookup

Wikibase\Client\Hooks\InfoActionHookHandler::$usageLookup
private

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