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

API module for creating entity redirects. More...

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

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, EntityIdParser $idParser, ApiErrorReporter $errorReporter, ItemRedirectCreationInteractor $interactor, PermissionManager $permissionManager, array $sandboxEntityIds)
 
 execute ()
 
 isWriteMode ()
 
 needsToken ()
 
 mustBePosted ()
 

Static Public Member Functions

static factory (ApiMain $apiMain, string $moduleName, PermissionManager $permissionManager, ApiHelperFactory $apiHelperFactory, EntityIdParser $entityIdParser, ItemRedirectCreationInteractor $interactor, SettingsArray $settings)
 

Protected Member Functions

 getAllowedParams ()
 
 getExamplesMessages ()
 

Private Member Functions

 createRedirect (EntityId $fromId, EntityId $toId, bool $bot, ApiResult $result, array $params)
 
 handleRedirectCreationException (RedirectCreationException $ex)
 

Private Attributes

EntityIdParser $idParser
 
ApiErrorReporter $errorReporter
 
ItemRedirectCreationInteractor $interactor
 
PermissionManager $permissionManager
 
array $sandboxEntityIds
 

Detailed Description

API module for creating entity redirects.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\CreateRedirect::__construct ( ApiMain $mainModule,
string $moduleName,
EntityIdParser $idParser,
ApiErrorReporter $errorReporter,
ItemRedirectCreationInteractor $interactor,
PermissionManager $permissionManager,
array $sandboxEntityIds )

Member Function Documentation

◆ createRedirect()

Wikibase\Repo\Api\CreateRedirect::createRedirect ( EntityId $fromId,
EntityId $toId,
bool $bot,
ApiResult $result,
array $params )
private
Parameters
EntityId$fromId
EntityId$toId
bool$botWhether the edit should be marked as bot
ApiResult$resultThe result object to report the result to.
array$paramsAny other params (for ApiCreateTempUserTrait).
Exceptions
RedirectCreationException

◆ execute()

Wikibase\Repo\Api\CreateRedirect::execute ( )

◆ factory()

static Wikibase\Repo\Api\CreateRedirect::factory ( ApiMain $apiMain,
string $moduleName,
PermissionManager $permissionManager,
ApiHelperFactory $apiHelperFactory,
EntityIdParser $entityIdParser,
ItemRedirectCreationInteractor $interactor,
SettingsArray $settings )
static

◆ getAllowedParams()

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

◆ getExamplesMessages()

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

◆ handleRedirectCreationException()

Wikibase\Repo\Api\CreateRedirect::handleRedirectCreationException ( RedirectCreationException $ex)
private
Parameters
RedirectCreationException$ex
Exceptions
ApiUsageExceptionalways

◆ isWriteMode()

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

◆ mustBePosted()

Wikibase\Repo\Api\CreateRedirect::mustBePosted ( )

◆ needsToken()

Wikibase\Repo\Api\CreateRedirect::needsToken ( )

Member Data Documentation

◆ $errorReporter

ApiErrorReporter Wikibase\Repo\Api\CreateRedirect::$errorReporter
private

◆ $idParser

EntityIdParser Wikibase\Repo\Api\CreateRedirect::$idParser
private

◆ $interactor

ItemRedirectCreationInteractor Wikibase\Repo\Api\CreateRedirect::$interactor
private

◆ $permissionManager

PermissionManager Wikibase\Repo\Api\CreateRedirect::$permissionManager
private

◆ $sandboxEntityIds

array Wikibase\Repo\Api\CreateRedirect::$sandboxEntityIds
private

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