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

API module to set the aliases for a Wikibase entity. More...

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

Public Member Functions

 __construct (ApiMain $mainModule, $moduleName, FingerprintChangeOpFactory $termChangeOpFactory, bool $federatedPropertiesEnabled)
 
 needsToken ()
 
 isWriteMode ()
 
- Public Member Functions inherited from Wikibase\Repo\Api\ModifyEntity
 __construct (ApiMain $mainModule, $moduleName, bool $federatedPropertiesEnabled, $modulePrefix='')
 
 setServices (SiteLinkTargetProvider $siteLinkTargetProvider)
 
 execute ()
 

Protected Member Functions

 validateParameters (array $params)
 
 modifyEntity (EntityDocument &$entity, ChangeOp $changeOp, array $preparedParameters)
 
 getChangeOp (array $preparedParameters, EntityDocument $entity)
 
 getAllowedParams ()
 
 getEntityTypesWithAliases ()
 
 getExamplesMessages ()
 
- Protected Member Functions inherited from Wikibase\Repo\Api\ModifyEntity
 getTitleLookup ()
 
 getResultBuilder ()
 
 createSummary (array $params)
 Create a new Summary instance suitable for representing the action performed by this module.
 
 applyChangeOp (ChangeOp $changeOp, EntityDocument $entity, Summary $summary=null)
 Applies the given ChangeOp to the given Entity.
 
 prepareParameters (array $params)
 
 validateEntitySpecificParameters (array $preparedParameters, EntityDocument $entity, $baseRevId)
 

Private Member Functions

 adjustSummary (Summary &$summary, array $params, AliasesProvider $entity)
 
 normalizeAliases (array $aliases)
 

Private Attributes

 $termChangeOpFactory
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\Repo\Api\ModifyEntity
 $stringNormalizer
 
 $siteLinkTargetProvider
 
 $siteLinkGroups
 
 $badgeItems
 
 $errorReporter
 
 $enabledEntityTypes
 

Detailed Description

API module to set the aliases for a Wikibase entity.

Requires API write mode to be enabled.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\SetAliases::__construct ( ApiMain  $mainModule,
  $moduleName,
FingerprintChangeOpFactory  $termChangeOpFactory,
bool  $federatedPropertiesEnabled 
)
Parameters
ApiMain$mainModule
string$moduleName
FingerprintChangeOpFactory$termChangeOpFactory

Member Function Documentation

◆ adjustSummary()

Wikibase\Repo\Api\SetAliases::adjustSummary ( Summary $summary,
array  $params,
AliasesProvider  $entity 
)
private

◆ getAllowedParams()

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

Reimplemented from Wikibase\Repo\Api\ModifyEntity.

◆ getChangeOp()

Wikibase\Repo\Api\SetAliases::getChangeOp ( array  $preparedParameters,
EntityDocument  $entity 
)
protected
See also
ModifyEntity::getChangeOp
Parameters
array$preparedParameters
EntityDocument$entity
Returns
ChangeOp

Reimplemented from Wikibase\Repo\Api\ModifyEntity.

◆ getEntityTypesWithAliases()

Wikibase\Repo\Api\SetAliases::getEntityTypesWithAliases ( )
protected

◆ getExamplesMessages()

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

◆ isWriteMode()

Wikibase\Repo\Api\SetAliases::isWriteMode ( )
See also
ApiBase::isWriteMode()
Returns
bool Always true.

◆ modifyEntity()

Wikibase\Repo\Api\SetAliases::modifyEntity ( EntityDocument &  $entity,
ChangeOp  $changeOp,
array  $preparedParameters 
)
protected
See also
ModifyEntity::modifyEntity
Parameters
EntityDocument&$entity
ChangeOp$changeOp
array$preparedParameters
Returns
Summary

Reimplemented from Wikibase\Repo\Api\ModifyEntity.

◆ needsToken()

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

◆ normalizeAliases()

Wikibase\Repo\Api\SetAliases::normalizeAliases ( array  $aliases)
private
Parameters
string[]$aliases
Returns
string[]

◆ validateParameters()

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

Reimplemented from Wikibase\Repo\Api\ModifyEntity.

Member Data Documentation

◆ $termChangeOpFactory

Wikibase\Repo\Api\SetAliases::$termChangeOpFactory
private

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