Wikibase
MediaWiki Wikibase extension
|
Derived class for API modules modifying a single entity identified by id xor a combination of site and page title. More...
Public Member Functions | |
__construct (ApiMain $mainModule, string $moduleName, IBufferingStatsdDataFactory $statsdDataFactory, EntityRevisionLookup $revisionLookup, EntityIdParser $idParser, array $propertyDataTypes, EntityChangeOpProvider $entityChangeOpProvider, EditSummaryHelper $editSummaryHelper, bool $federatedPropertiesEnabled, 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, IBufferingStatsdDataFactory $statsdDataFactory, DataTypeDefinitions $dataTypeDefinitions, EntityChangeOpProvider $entityChangeOpProvider, EntityIdParser $entityIdParser, SettingsArray $settings, Store $store) |
Public Attributes | |
const | PARAM_DATA = 'data' |
const | PARAM_CLEAR = 'clear' |
Protected Member Functions | |
prepareParameters (array $params) | |
validateEntitySpecificParameters (array $preparedParameters, EntityDocument $entity, int $baseRevId) | |
modifyEntity (EntityDocument $entity, ChangeOp $changeOp, array $preparedParameters) | |
Actually modify the entity. | |
getChangeOp (array $preparedParameters, EntityDocument $entity) | |
getAllowedParams () | |
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. | |
validateParameters (array $params) | |
Make sure the required parameters are provided and that they are valid. | |
Private Member Functions | |
entityExists (EntityId $entityId) | |
getSummary (array $preparedParameters, EntityDocument $entity, ChangeOpResult $changeOpResult) | |
isUpdatingExistingEntity (array $preparedParameters) | |
validateDataParameter (array $params) | |
validateDataProperties ( $data, EntityDocument $entity, int $revisionId) | |
checkValidJson ( $data) | |
checkPageIdProp (array $data, ?Title $title) | |
checkNamespaceProp (array $data, ?Title $title) | |
checkTitleProp (array $data, ?Title $title) | |
checkRevisionProp (array $data, int $revisionId) | |
checkEntityId (array $data, ?EntityId $entityId) | |
checkEntityType (array $data, EntityDocument $entity) | |
assertArray ( $value, string $message) | |
assertString ( $value, string $message) | |
assertType (string $type, $value, string $message) | |
dieIfNotClearable (EntityDocument $entity) | |
Private Attributes | |
$statsdDataFactory | |
$revisionLookup | |
$idParser | |
$propertyDataTypes | |
$entityChangeOpProvider | |
$editSummaryHelper | |
$sandboxEntityIds | |
Additional Inherited Members | |
Protected Attributes inherited from Wikibase\Repo\Api\ModifyEntity | |
$stringNormalizer | |
$siteLinkGlobalIdentifiersProvider | |
$siteLinkGroups | |
$badgeItems | |
$errorReporter | |
$enabledEntityTypes | |
Derived class for API modules modifying a single entity identified by id xor a combination of site and page title.
Wikibase\Repo\Api\EditEntity::__construct | ( | ApiMain | $mainModule, |
string | $moduleName, | ||
IBufferingStatsdDataFactory | $statsdDataFactory, | ||
EntityRevisionLookup | $revisionLookup, | ||
EntityIdParser | $idParser, | ||
array | $propertyDataTypes, | ||
EntityChangeOpProvider | $entityChangeOpProvider, | ||
EditSummaryHelper | $editSummaryHelper, | ||
bool | $federatedPropertiesEnabled, | ||
array | $sandboxEntityIds ) |
|
private |
mixed | $value | |
string | $message |
|
private |
mixed | $value | |
string | $message |
|
private |
string | $type | |
mixed | $value | |
string | $message |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
mixed | $data |
|
private |
|
private |
EntityId | $entityId |
|
static |
|
protected |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
|
protected |
array | $preparedParameters | |
EntityDocument | $entity |
ApiUsageException |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
|
protected |
|
private |
|
private |
Wikibase\Repo\Api\EditEntity::isWriteMode | ( | ) |
|
protected |
Actually modify the entity.
EntityDocument | $entity | |
ChangeOp | $changeOp | |
array | $preparedParameters |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
Wikibase\Repo\Api\EditEntity::needsToken | ( | ) |
|
protected |
|
private |
|
private |
mixed | $data | |
EntityDocument | $entity | |
int | $revisionId |
|
protected |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
const Wikibase\Repo\Api\EditEntity::PARAM_CLEAR = 'clear' |
const Wikibase\Repo\Api\EditEntity::PARAM_DATA = 'data' |