Wikibase
MediaWiki Wikibase extension
|
API module to associate a page on a site with a Wikibase entity or remove an already made such association. More...
Public Member Functions | |
__construct (ApiMain $mainModule, $moduleName, SiteLinkChangeOpFactory $siteLinkChangeOpFactory, SiteLinkBadgeChangeOpSerializationValidator $badgeSerializationValidator, bool $federatedPropertiesEnabled) | |
isWriteMode () | |
needsToken () | |
Public Member Functions inherited from Wikibase\Repo\Api\ModifyEntity | |
__construct (ApiMain $mainModule, $moduleName, bool $federatedPropertiesEnabled, $modulePrefix='') | |
setServices (SiteLinkTargetProvider $siteLinkTargetProvider) | |
execute () | |
Protected Member Functions | |
modifyEntity (EntityDocument &$entity, ChangeOp $changeOp, array $preparedParameters) | |
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. | |
prepareParameters (array $params) | |
validateEntitySpecificParameters (array $preparedParameters, EntityDocument $entity, $baseRevId) | |
validateParameters (array $params) | |
Make sure the required parameters are provided and that they are valid. | |
Private Member Functions | |
shouldRemove (array $params) | |
Checks whether the link should be removed based on params. | |
parseSiteLinkBadges (array $badges) | |
getBadgeItemIds (array $badges) | |
Private Attributes | |
$siteLinkChangeOpFactory | |
$badgeSerializationValidator | |
Additional Inherited Members | |
Protected Attributes inherited from Wikibase\Repo\Api\ModifyEntity | |
$stringNormalizer | |
$siteLinkTargetProvider | |
$siteLinkGroups | |
$badgeItems | |
$errorReporter | |
$enabledEntityTypes | |
API module to associate a page on a site with a Wikibase entity or remove an already made such association.
Requires API write mode to be enabled.
Wikibase\Repo\Api\SetSiteLink::__construct | ( | ApiMain | $mainModule, |
$moduleName, | |||
SiteLinkChangeOpFactory | $siteLinkChangeOpFactory, | ||
SiteLinkBadgeChangeOpSerializationValidator | $badgeSerializationValidator, | ||
bool | $federatedPropertiesEnabled | ||
) |
|
protected |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
|
private |
|
protected |
array | $preparedParameters | |
EntityDocument | $entity |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
|
protected |
Wikibase\Repo\Api\SetSiteLink::isWriteMode | ( | ) |
|
protected |
EntityDocument | &$entity | |
ChangeOp | $changeOp | |
array | $preparedParameters |
Reimplemented from Wikibase\Repo\Api\ModifyEntity.
Wikibase\Repo\Api\SetSiteLink::needsToken | ( | ) |
|
private |
|
private |
Checks whether the link should be removed based on params.
array | $params |
|
private |
|
private |