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

API module for the language attributes for a Wikibase entity. More...

Inheritance diagram for Wikibase\Repo\Api\SetDescription:
Collaboration diagram for Wikibase\Repo\Api\SetDescription:

Public Member Functions

 __construct (ApiMain $mainModule, string $moduleName, FingerprintChangeOpFactory $termChangeOpFactory, bool $federatedPropertiesEnabled, EntityFactory $entityFactory, array $sandboxEntityIds)
 needsToken ()
 isWriteMode ()
Public Member Functions inherited from Wikibase\Repo\Api\ModifyEntity
 __construct (ApiMain $mainModule, string $moduleName, bool $federatedPropertiesEnabled, string $modulePrefix='')
 setServices (SiteLinkGlobalIdentifiersProvider $siteLinkGlobalIdentifiersProvider)
 execute ()
 isFreshIdAssigned ()
 Return whether a fresh id is assigned or not.

Static Public Member Functions

static factory (ApiMain $mainModule, string $moduleName, ChangeOpFactoryProvider $changeOpFactoryProvider, EntityFactory $entityFactory, SettingsArray $repoSettings)

Protected Member Functions

 modifyEntity (EntityDocument $entity, ChangeOp $changeOp, array $preparedParameters)
 Actually modify the entity.
 getChangeOp (array $preparedParameters, EntityDocument $entity)
 getExamplesMessages ()
 getAllowedParams ()
 getEntityTypesWithDescriptions ()
Protected Member Functions inherited from Wikibase\Repo\Api\ModifyTerm
 createSummary (array $params)
 Creates a Summary object based on the given API call parameters.
Protected Member Functions inherited from Wikibase\Repo\Api\ModifyEntity
 getTitleLookup ()
 getResultBuilder ()
 applyChangeOp (ChangeOp $changeOp, EntityDocument $entity, ?Summary $summary=null)
 Applies the given ChangeOp to the given Entity.
 prepareParameters (array $params)
 validateEntitySpecificParameters (array $preparedParameters, EntityDocument $entity, int $baseRevId)
 validateParameters (array $params)
 Make sure the required parameters are provided and that they are valid.

Private Attributes

 $termChangeOpFactory
 $entityFactory
 $sandboxEntityIds

Additional Inherited Members

Public Attributes inherited from Wikibase\Repo\Api\ModifyEntity
const PARAM_SUMMARY = 'summary'
Protected Attributes inherited from Wikibase\Repo\Api\ModifyEntity
 $stringNormalizer
 $siteLinkGlobalIdentifiersProvider
 $badgeItems
 $errorReporter
 $enabledEntityTypes

Detailed Description

API module for the language attributes for a Wikibase entity.

Requires API write mode to be enabled.

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
John Erling Blad < jebla.nosp@m.d@gm.nosp@m.ail.c.nosp@m.om >
Tobias Gritschacher < tobia.nosp@m.s.gr.nosp@m.itsch.nosp@m.ache.nosp@m.r@wik.nosp@m.imed.nosp@m.ia.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Api\SetDescription::__construct ( ApiMain $mainModule,
string $moduleName,
FingerprintChangeOpFactory $termChangeOpFactory,
bool $federatedPropertiesEnabled,
EntityFactory $entityFactory,
array $sandboxEntityIds )

Member Function Documentation

◆ factory()

Wikibase\Repo\Api\SetDescription::factory ( ApiMain $mainModule,
string $moduleName,
ChangeOpFactoryProvider $changeOpFactoryProvider,
EntityFactory $entityFactory,
SettingsArray $repoSettings )
static

◆ getAllowedParams()

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

Reimplemented from Wikibase\Repo\Api\ModifyTerm.

◆ getChangeOp()

Wikibase\Repo\Api\SetDescription::getChangeOp ( array $preparedParameters,
EntityDocument $entity )
protected
Parameters
array$preparedParameters
EntityDocument$entity
Returns
ChangeOp

Reimplemented from Wikibase\Repo\Api\ModifyEntity.

◆ getEntityTypesWithDescriptions()

Wikibase\Repo\Api\SetDescription::getEntityTypesWithDescriptions ( )
protected

◆ getExamplesMessages()

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

◆ isWriteMode()

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

◆ modifyEntity()

Wikibase\Repo\Api\SetDescription::modifyEntity ( EntityDocument $entity,
ChangeOp $changeOp,
array $preparedParameters )
protected

Actually modify the entity.

Parameters
EntityDocument$entity
ChangeOp$changeOp
array$preparedParameters
Returns
Summary|null a summary of the modification, or null to indicate failure.

Reimplemented from Wikibase\Repo\Api\ModifyEntity.

◆ needsToken()

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

Member Data Documentation

◆ $entityFactory

Wikibase\Repo\Api\SetDescription::$entityFactory
private

◆ $sandboxEntityIds

Wikibase\Repo\Api\SetDescription::$sandboxEntityIds
private

◆ $termChangeOpFactory

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

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