Base class for API modules modifying a single entity identified based on id xor a combination of site and page title.
More...
|
| | loadEntityFromSavingHelper (?EntityId $entityId) |
| | Try to find the entity or fail and create it, or die in the process.
|
| |
| | checkPermissions (EntityDocument $entity, User $user, ChangeOp $changeOp) |
| | Check the rights for the user accessing the module.
|
| |
| | addToOutput (EntityDocument $entity, Status $status, $oldRevId=null) |
| |
| | getAllowedParamsForId () |
| | Get allowed params for the identification of the entity Lookup through an id is common for all entities.
|
| |
| | getAllowedParamsForSiteLink () |
| | Get allowed params for the identification by a sitelink pair Lookup through the sitelink object is not used in every subclasses.
|
| |
| | getAllowedParamsForEntity () |
| | Get allowed params for the entity in general.
|
| |
Base class for API modules modifying a single entity identified based on id xor a combination of site and page title.
- Copyright
- GPL-2.0-or-later
- Author
- John Erling Blad < jebla.nosp@m.d@gm.nosp@m.ail.c.nosp@m.om >
-
Daniel Kinzler
-
Michał Łazowik
◆ __construct()
| Wikibase\Repo\Api\ModifyEntity::__construct |
( |
ApiMain |
$mainModule, |
|
|
|
$moduleName, |
|
|
bool |
$federatedPropertiesEnabled, |
|
|
|
$modulePrefix = '' |
|
) |
| |
- Parameters
-
| ApiMain | $mainModule | |
| string | $moduleName | |
| bool | $federatedPropertiesEnabled | |
| string | $modulePrefix | |
- See also
- ApiBase::__construct
◆ addToOutput()
| Wikibase\Repo\Api\ModifyEntity::addToOutput |
( |
EntityDocument |
$entity, |
|
|
Status |
$status, |
|
|
|
$oldRevId = null |
|
) |
| |
|
private |
◆ applyChangeOp()
| Wikibase\Repo\Api\ModifyEntity::applyChangeOp |
( |
ChangeOp |
$changeOp, |
|
|
EntityDocument |
$entity, |
|
|
Summary |
$summary = null |
|
) |
| |
|
protected |
Applies the given ChangeOp to the given Entity.
Any ChangeOpException is converted into an ApiUsageException with the code 'modification-failed'.
- Parameters
-
| ChangeOp | $changeOp | |
| EntityDocument | $entity | |
| Summary | null | $summary | The summary object to update with information about the change. |
- Returns
- ChangeOpResult
◆ checkPermissions()
| Wikibase\Repo\Api\ModifyEntity::checkPermissions |
( |
EntityDocument |
$entity, |
|
|
User |
$user, |
|
|
ChangeOp |
$changeOp |
|
) |
| |
|
private |
Check the rights for the user accessing the module.
- Parameters
-
| EntityDocument | $entity | the entity to check |
| User | $user | User doing the action |
| ChangeOp | $changeOp | |
- Returns
- Status the check's result
◆ createSummary()
| Wikibase\Repo\Api\ModifyEntity::createSummary |
( |
array |
$params | ) |
|
|
protected |
Create a new Summary instance suitable for representing the action performed by this module.
- Parameters
-
- Returns
- Summary
Reimplemented in Wikibase\Repo\Api\ModifyTerm.
◆ execute()
| Wikibase\Repo\Api\ModifyEntity::execute |
( |
| ) |
|
◆ getAllowedParams()
| Wikibase\Repo\Api\ModifyEntity::getAllowedParams |
( |
| ) |
|
|
protected |
◆ getAllowedParamsForEntity()
| Wikibase\Repo\Api\ModifyEntity::getAllowedParamsForEntity |
( |
| ) |
|
|
private |
Get allowed params for the entity in general.
- Returns
- array
◆ getAllowedParamsForId()
| Wikibase\Repo\Api\ModifyEntity::getAllowedParamsForId |
( |
| ) |
|
|
private |
Get allowed params for the identification of the entity Lookup through an id is common for all entities.
- Returns
- array[]
◆ getAllowedParamsForSiteLink()
| Wikibase\Repo\Api\ModifyEntity::getAllowedParamsForSiteLink |
( |
| ) |
|
|
private |
Get allowed params for the identification by a sitelink pair Lookup through the sitelink object is not used in every subclasses.
- Returns
- array[]
◆ getChangeOp()
| Wikibase\Repo\Api\ModifyEntity::getChangeOp |
( |
array |
$preparedParameters, |
|
|
EntityDocument |
$entity |
|
) |
| |
|
abstractprotected |
◆ getResultBuilder()
| Wikibase\Repo\Api\ModifyEntity::getResultBuilder |
( |
| ) |
|
|
protected |
◆ getTitleLookup()
| Wikibase\Repo\Api\ModifyEntity::getTitleLookup |
( |
| ) |
|
|
protected |
- Returns
- EntityTitleStoreLookup
◆ loadEntityFromSavingHelper()
| Wikibase\Repo\Api\ModifyEntity::loadEntityFromSavingHelper |
( |
?EntityId |
$entityId | ) |
|
|
private |
Try to find the entity or fail and create it, or die in the process.
- Parameters
-
- Returns
- EntityDocument
- Exceptions
-
◆ modifyEntity()
| Wikibase\Repo\Api\ModifyEntity::modifyEntity |
( |
EntityDocument & |
$entity, |
|
|
ChangeOp |
$changeOp, |
|
|
array |
$preparedParameters |
|
) |
| |
|
abstractprotected |
◆ prepareParameters()
| Wikibase\Repo\Api\ModifyEntity::prepareParameters |
( |
array |
$params | ) |
|
|
protected |
◆ setServices()
◆ validateEntitySpecificParameters()
| Wikibase\Repo\Api\ModifyEntity::validateEntitySpecificParameters |
( |
array |
$preparedParameters, |
|
|
EntityDocument |
$entity, |
|
|
|
$baseRevId |
|
) |
| |
|
protected |
◆ validateParameters()
| Wikibase\Repo\Api\ModifyEntity::validateParameters |
( |
array |
$params | ) |
|
|
protected |
◆ $badgeItems
| Wikibase\Repo\Api\ModifyEntity::$badgeItems |
|
protected |
◆ $enabledEntityTypes
| Wikibase\Repo\Api\ModifyEntity::$enabledEntityTypes |
|
protected |
◆ $entitySavingHelper
| Wikibase\Repo\Api\ModifyEntity::$entitySavingHelper |
|
private |
◆ $errorReporter
| Wikibase\Repo\Api\ModifyEntity::$errorReporter |
|
protected |
◆ $permissionChecker
| Wikibase\Repo\Api\ModifyEntity::$permissionChecker |
|
private |
◆ $resultBuilder
| Wikibase\Repo\Api\ModifyEntity::$resultBuilder |
|
private |
◆ $revisionLookup
| Wikibase\Repo\Api\ModifyEntity::$revisionLookup |
|
private |
◆ $siteLinkGroups
| Wikibase\Repo\Api\ModifyEntity::$siteLinkGroups |
|
protected |
◆ $siteLinkTargetProvider
| Wikibase\Repo\Api\ModifyEntity::$siteLinkTargetProvider |
|
protected |
◆ $stringNormalizer
| Wikibase\Repo\Api\ModifyEntity::$stringNormalizer |
|
protected |
◆ $titleLookup
| Wikibase\Repo\Api\ModifyEntity::$titleLookup |
|
private |
The documentation for this class was generated from the following file: