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, $moduleName, SiteLinkTargetProvider $siteLinkTargetProvider, ApiErrorReporter $errorReporter, array $siteLinkGroups, EntityRevisionLookup $revisionLookup, callable $resultBuilderInstantiator, callable $entitySavingHelperInstantiator)
 
 isWriteMode ()
 
 needsToken ()
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

 $siteLinkTargetProvider
 
 $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,
  $moduleName,
SiteLinkTargetProvider  $siteLinkTargetProvider,
ApiErrorReporter  $errorReporter,
array  $siteLinkGroups,
EntityRevisionLookup  $revisionLookup,
callable  $resultBuilderInstantiator,
callable  $entitySavingHelperInstantiator 
)
See also
ApiBase::__construct
Parameters
ApiMain$mainModule
string$moduleName
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

◆ getAllowedParams()

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

◆ getAttemptSaveStatus()

Wikibase\Repo\Api\LinkTitles::getAttemptSaveStatus ( ?Item  $item,
Summary  $summary,
  $flags 
)
private
Parameters
Item | null$item
Summary$summary
int$flags
Returns
Status

◆ getExamplesMessages()

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

◆ getSiteAndNormalizedPageName()

Wikibase\Repo\Api\LinkTitles::getSiteAndNormalizedPageName ( SiteList  $sites,
  $site,
  $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

◆ $siteLinkGroups

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

◆ $siteLinkTargetProvider

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

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