Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Specials\SpecialGoToLinkedPage Class Reference

Enables accessing a linked page on a site by providing the item id and site id. More...

+ Inheritance diagram for Wikibase\Repo\Specials\SpecialGoToLinkedPage:
+ Collaboration diagram for Wikibase\Repo\Specials\SpecialGoToLinkedPage:

Public Member Functions

 __construct (SiteLookup $siteLookup, SiteLinkLookup $siteLinkLookup, EntityRedirectTargetLookup $redirectLookup, EntityIdParser $idParser, EntityLookup $entityLookup)
 
 execute ( $subPage)
 
- Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 __construct ( $name='', $restriction='', $listed=true)
 
 getDescription ()
 
 setHeaders ()
 

Static Public Member Functions

static factory (SiteLookup $siteLookup, EntityIdParser $entityIdParser, EntityLookup $entityLookup, Store $store)
 

Private Member Functions

 getArguments ( $subPage)
 
 getTargetUrl ( $site, $itemString)
 
 getItemId ( $itemString)
 Parses a string to itemId.
 
 loadLinks ( $site, ItemId $itemId)
 Load the sitelink using a SiteLinkLookup.
 
 outputForm (array $sites, $itemString)
 Output a form via the context's OutputPage object to go to a sitelink (linked page) for an item and site id.
 
 outputError ()
 Outputs an error message.
 

Private Attributes

 $siteLookup
 
 $siteLinkLookup
 
 $redirectLookup
 
 $idParser
 
 $entityLookup
 
 $errorMessageKey = null
 

Additional Inherited Members

- Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 getGroupName ()
 
 checkBlocked ()
 Checks if user is blocked, and if blocked throws a UserBlocked.
 
 showErrorHTML ( $error)
 
- Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibasePage
 $stringNormalizer
 

Detailed Description

Enables accessing a linked page on a site by providing the item id and site id.

Author
Jan Zerebecki

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::__construct ( SiteLookup $siteLookup,
SiteLinkLookup $siteLinkLookup,
EntityRedirectTargetLookup $redirectLookup,
EntityIdParser $idParser,
EntityLookup $entityLookup )
See also
SpecialWikibasePage::__construct
Parameters
SiteLookup$siteLookup
SiteLinkLookup$siteLinkLookup
EntityRedirectTargetLookup$redirectLookup
EntityIdParser$idParser
EntityLookup$entityLookup

Member Function Documentation

◆ execute()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::execute ( $subPage)
See also
SpecialWikibasePage::execute
Parameters
string | null$subPage

Reimplemented from Wikibase\Repo\Specials\SpecialWikibasePage.

◆ factory()

static Wikibase\Repo\Specials\SpecialGoToLinkedPage::factory ( SiteLookup $siteLookup,
EntityIdParser $entityIdParser,
EntityLookup $entityLookup,
Store $store )
static

◆ getArguments()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::getArguments ( $subPage)
private
Parameters
string | null$subPage
Returns
array ( string[] $sites, string $itemString ) -return array{0:string[],1:string}

◆ getItemId()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::getItemId ( $itemString)
private

Parses a string to itemId.

Parameters
string$itemString
Returns
ItemId|null

◆ getTargetUrl()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::getTargetUrl ( $site,
$itemString )
private
Parameters
string$site
string$itemString
Returns
string|null the URL to redirect to or null if the sitelink does not exist

◆ loadLinks()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::loadLinks ( $site,
ItemId $itemId )
private

Load the sitelink using a SiteLinkLookup.

Resolves item redirects, if needed.

Parameters
string$site
ItemId$itemId
Returns
array[]

◆ outputError()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::outputError ( )
private

Outputs an error message.

◆ outputForm()

Wikibase\Repo\Specials\SpecialGoToLinkedPage::outputForm ( array $sites,
$itemString )
private

Output a form via the context's OutputPage object to go to a sitelink (linked page) for an item and site id.

Parameters
string[]$sites
string$itemString

Member Data Documentation

◆ $entityLookup

Wikibase\Repo\Specials\SpecialGoToLinkedPage::$entityLookup
private

◆ $errorMessageKey

Wikibase\Repo\Specials\SpecialGoToLinkedPage::$errorMessageKey = null
private

◆ $idParser

Wikibase\Repo\Specials\SpecialGoToLinkedPage::$idParser
private

◆ $redirectLookup

Wikibase\Repo\Specials\SpecialGoToLinkedPage::$redirectLookup
private

◆ $siteLinkLookup

Wikibase\Repo\Specials\SpecialGoToLinkedPage::$siteLinkLookup
private

◆ $siteLookup

Wikibase\Repo\Specials\SpecialGoToLinkedPage::$siteLookup
private

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