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, LanguageFallbackLabelDescriptionLookupFactory $labelDescriptionLookupFactory, EntityIdParser $idParser, DescriptionLookup $descriptionLookup)
 
 onInfoAction ( $context, &$pageInfo)
 Adds the Entity ID of the corresponding Wikidata item in action=info.
 

Static Public Member Functions

static newFromGlobalState ()
 

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 (IContextSource $context, array $usage)
 

Private Attributes

 $namespaceChecker
 
 $repoLinker
 
 $siteLinkLookup
 
 $siteId
 
 $usageLookup
 
 $labelDescriptionLookupFactory
 
 $idParser
 
 $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,
LanguageFallbackLabelDescriptionLookupFactory  $labelDescriptionLookupFactory,
EntityIdParser  $idParser,
DescriptionLookup  $descriptionLookup 
)

Member Function Documentation

◆ formatAspects()

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

◆ formatEntityUsage()

Wikibase\Client\Hooks\InfoActionHookHandler::formatEntityUsage ( IContextSource  $context,
array  $usage 
)
private
Parameters
IContextSource$context
array$usage
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[]

◆ newFromGlobalState()

static Wikibase\Client\Hooks\InfoActionHookHandler::newFromGlobalState ( )
static

◆ 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

◆ $idParser

Wikibase\Client\Hooks\InfoActionHookHandler::$idParser
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: