Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Api\LinkTitles Class Reference

API module to associate two pages on two different sites with a Wikibase item. More...

+ Inheritance diagram for Wikibase\Repo\Api\LinkTitles:
+ Collaboration diagram for Wikibase\Repo\Api\LinkTitles:

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, SiteLinkStore $siteLinkStore, SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider, SiteLinkTargetProvider $siteLinkTargetProvider, ApiErrorReporter $errorReporter, array $siteLinkGroups, EntityRevisionLookup $revisionLookup, callable $resultBuilderInstantiator, callable $entitySavingHelperInstantiator)
 
 isWriteMode ()
 
 needsToken ()
 

Static Public Member Functions

static factory (ApiMain $mainModule, string $moduleName, ApiHelperFactory $apiHelperFactory, SettingsArray $repoSettings, SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider, SiteLinkTargetProvider $siteLinkTargetProvider, Store $store)
 

Protected Member Functions

 validateParameters (array $params)
 
 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 getSiteAndNormalizedPageName (SiteList $sites, string $site, string $pageTitle)
 
 getAttemptSaveStatus (?Item $item, Summary $summary, int $flags)
 
 buildResult (?Item $item, Status $status)
 

Private Attributes

 $siteLinkStore
 
 $siteLinkTargetProvider
 
 $siteLinkGlobalIdentifiersProvider
 
 $errorReporter
 
 $siteLinkGroups
 
 $revisionLookup
 
 $resultBuilder
 
 $entitySavingHelper
 

Detailed Description

API module to associate two pages on two different sites with a Wikibase item.

Requires API write mode to be enabled.

Author
John Erling Blad < jebla.nosp@m.d@gm.nosp@m.ail.c.nosp@m.om >
Addshore

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\LinkTitles::__construct ( ApiMain $mainModule,
string $moduleName,
SiteLinkStore $siteLinkStore,
SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider,
SiteLinkTargetProvider $siteLinkTargetProvider,
ApiErrorReporter $errorReporter,
array $siteLinkGroups,
EntityRevisionLookup $revisionLookup,
callable $resultBuilderInstantiator,
callable $entitySavingHelperInstantiator )

Member Function Documentation

◆ buildResult()

Wikibase\Repo\Api\LinkTitles::buildResult ( ?Item $item,
Status $status )
private

◆ factory()

static Wikibase\Repo\Api\LinkTitles::factory ( ApiMain $mainModule,
string $moduleName,
ApiHelperFactory $apiHelperFactory,
SettingsArray $repoSettings,
SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider,
SiteLinkTargetProvider $siteLinkTargetProvider,
Store $store )
static

◆ getAllowedParams()

Wikibase\Repo\Api\LinkTitles::getAllowedParams ( )
protected

◆ getAttemptSaveStatus()

Wikibase\Repo\Api\LinkTitles::getAttemptSaveStatus ( ?Item $item,
Summary $summary,
int $flags )
private

◆ getExamplesMessages()

Wikibase\Repo\Api\LinkTitles::getExamplesMessages ( )
protected

◆ getSiteAndNormalizedPageName()

Wikibase\Repo\Api\LinkTitles::getSiteAndNormalizedPageName ( SiteList $sites,
string $site,
string $pageTitle )
private
Parameters
SiteList$sites
string$site
string$pageTitle
Returns
array ( Site $site, string $pageName ) -return array{0:Site,1:string}

◆ isWriteMode()

Wikibase\Repo\Api\LinkTitles::isWriteMode ( )

◆ needsToken()

Wikibase\Repo\Api\LinkTitles::needsToken ( )
See also
ApiBase::needsToken
Returns
string

◆ validateParameters()

Wikibase\Repo\Api\LinkTitles::validateParameters ( array $params)
protected
See also
ModifyEntity::validateParameters
Parameters
array$params

Member Data Documentation

◆ $entitySavingHelper

Wikibase\Repo\Api\LinkTitles::$entitySavingHelper
private

◆ $errorReporter

Wikibase\Repo\Api\LinkTitles::$errorReporter
private

◆ $resultBuilder

Wikibase\Repo\Api\LinkTitles::$resultBuilder
private

◆ $revisionLookup

Wikibase\Repo\Api\LinkTitles::$revisionLookup
private

◆ $siteLinkGlobalIdentifiersProvider

Wikibase\Repo\Api\LinkTitles::$siteLinkGlobalIdentifiersProvider
private

◆ $siteLinkGroups

Wikibase\Repo\Api\LinkTitles::$siteLinkGroups
private

◆ $siteLinkStore

Wikibase\Repo\Api\LinkTitles::$siteLinkStore
private

◆ $siteLinkTargetProvider

Wikibase\Repo\Api\LinkTitles::$siteLinkTargetProvider
private

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