Wikibase
MediaWiki Wikibase extension
|
Abstract special page for modifying Wikibase entity. More...
Public Member Functions | |
__construct ( $title, array $tags, SpecialPageCopyrightView $copyrightView, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediaWikiEditEntityFactory $editEntityFactory) | |
doesWrites () | |
execute ( $subPage) | |
Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage | |
__construct ( $title, $restriction, array $tags, SpecialPageCopyrightView $copyrightView, SummaryFormatter $summaryFormatter, EntityTitleLookup $entityTitleLookup, MediaWikiEditEntityFactory $editEntityFactory) | |
Public Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage | |
__construct ( $name='', $restriction='', $listed=true) | |
getDescription () | |
setHeaders () | |
Protected Member Functions | |
getEntityId () | |
Returns the ID of the Entity being modified. | |
getBaseRevision () | |
Returns the base revision. | |
getLatestRevision () | |
Returns the current revision. | |
getEntityForModification () | |
Returns the EntityDocument that is to be modified by code in this class (or subclasses). | |
getEntityForDisplay () | |
Returns the EntityDocument that is to be shown by code in this class (or subclasses). | |
processArguments ( $subPage) | |
Prepares the arguments. | |
getForm (EntityDocument $entity=null) | |
Return the HTML form. | |
getFormElements (EntityDocument $entity=null) | |
validateInput () | |
Validates form input. | |
isModificationRequested () | |
Whether the current request is a request for modification (as opposed to a request for showing the input form). | |
modifyEntity (EntityDocument $entity) | |
Modifies the entity. | |
applyChangeOp (ChangeOp $changeOp, EntityDocument $entity, Summary $summary=null) | |
Applies the given ChangeOp to the given Entity. | |
getSubmitKey (EntityDocument $entity=null) | |
showCopyrightNotice (EntityDocument $entity=null) | |
Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage | |
prepareEditEntity (EntityId $id=null, $baseRev=0) | |
getEditEntity () | |
Returns the EditEntity interactor. | |
parseEntityId ( $rawId) | |
Parses an entity id. | |
parseItemId ( $rawId) | |
Parses an item id. | |
getEntityTitle (EntityId $id) | |
saveEntity (EntityDocument $entity, FormatableSummary $summary, $token, $flags=EDIT_UPDATE) | |
Saves the entity using the given summary. | |
getCopyrightHTML ( $saveMessageKey=null) | |
Protected Member Functions inherited from Wikibase\Repo\Specials\SpecialWikibasePage | |
getGroupName () | |
checkBlocked () | |
Checks if user is blocked, and if blocked throws a UserBlocked. | |
showErrorHTML ( $error) | |
Private Member Functions | |
handleStatus (Status $status, EntityDocument $entity) | |
setForm (EntityDocument $entity=null) | |
Building the HTML form for modifying an entity. | |
Private Attributes | |
$entityForModification = null | |
$entityId | |
Additional Inherited Members | |
Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibaseRepoPage | |
$summaryFormatter | |
Protected Attributes inherited from Wikibase\Repo\Specials\SpecialWikibasePage | |
$stringNormalizer | |
Abstract special page for modifying Wikibase entity.
Wikibase\Repo\Specials\SpecialModifyEntity::__construct | ( | $title, | |
array | $tags, | ||
SpecialPageCopyrightView | $copyrightView, | ||
SummaryFormatter | $summaryFormatter, | ||
EntityTitleLookup | $entityTitleLookup, | ||
MediaWikiEditEntityFactory | $editEntityFactory ) |
string | $title | The title of the special page |
string[] | $tags | List of tags to add to edits |
SpecialPageCopyrightView | $copyrightView | |
SummaryFormatter | $summaryFormatter | |
EntityTitleLookup | $entityTitleLookup | |
MediaWikiEditEntityFactory | $editEntityFactory |
|
protected |
Applies the given ChangeOp to the given Entity.
If validation fails, a ChangeOpValidationException is thrown.
ChangeOp | $changeOp | |
EntityDocument | $entity | |
Summary | null | $summary | The summary object to update with information about the change. |
ChangeOpException |
Wikibase\Repo\Specials\SpecialModifyEntity::doesWrites | ( | ) |
Wikibase\Repo\Specials\SpecialModifyEntity::execute | ( | $subPage | ) |
string | null | $subPage |
Reimplemented from Wikibase\Repo\Specials\SpecialWikibasePage.
|
protected |
Returns the base revision.
If no base revision ID was passed to prepareEditEntity(), this returns the latest revision.
UserInputException |
|
protected |
Returns the EntityDocument that is to be shown by code in this class (or subclasses).
The returns null if no entity ID was specified in the request.
MessageException | |
UserInputException |
|
protected |
Returns the EntityDocument that is to be modified by code in this class (or subclasses).
The first call to this method calls getBaseRevision().
MessageException | |
UserInputException |
|
protected |
Returns the ID of the Entity being modified.
Returns null if no entity ID was specified in the request.
|
abstractprotected |
Return the HTML form.
EntityDocument | null | $entity |
Reimplemented in Wikibase\Repo\Specials\SpecialModifyTerm, Wikibase\Repo\Specials\SpecialSetLabelDescriptionAliases, and Wikibase\Repo\Specials\SpecialSetSiteLink.
|
protected |
EntityDocument | null | $entity |
|
protected |
Returns the current revision.
UserInputException |
|
protected |
EntityDocument | null | $entity |
Reimplemented in Wikibase\Repo\Specials\SpecialSetLabelDescriptionAliases.
|
private |
|
protected |
Whether the current request is a request for modification (as opposed to a request for showing the input form).
If this method returns false, the entity should not be updated and the user should be presented with an input form. Only if it returns true, and validateInput() also returns true, the entity should be updated in the storage backend.
Undefined before processArguments() was called.
|
abstractprotected |
Modifies the entity.
EntityDocument | $entity |
Reimplemented in Wikibase\Repo\Specials\SpecialModifyTerm, Wikibase\Repo\Specials\SpecialSetLabelDescriptionAliases, and Wikibase\Repo\Specials\SpecialSetSiteLink.
|
protected |
Prepares the arguments.
string | null | $subPage |
Reimplemented in Wikibase\Repo\Specials\SpecialModifyTerm, Wikibase\Repo\Specials\SpecialSetLabelDescriptionAliases, and Wikibase\Repo\Specials\SpecialSetSiteLink.
|
private |
Building the HTML form for modifying an entity.
EntityDocument | null | $entity |
|
protected |
EntityDocument | null | $entity |
Reimplemented in Wikibase\Repo\Specials\SpecialSetLabelDescriptionAliases.
|
protected |
Validates form input.
The default implementation does nothing. Subclasses should override this to detect otherwise incomplete or erroneous input.
If this method returns false, the entity should not be updated and the user should be presented with an input form. Only if it returns true, and isModificationRequested() also returns true, the entity should be updated in the storage backend.
UserInputException | if any of the provided input is invalid. If the input is merely incomplete, no exception should be raised. |
Reimplemented in Wikibase\Repo\Specials\SpecialModifyTerm, Wikibase\Repo\Specials\SpecialSetAliases, Wikibase\Repo\Specials\SpecialSetDescription, Wikibase\Repo\Specials\SpecialSetLabel, Wikibase\Repo\Specials\SpecialSetLabelDescriptionAliases, and Wikibase\Repo\Specials\SpecialSetSiteLink.
|
private |
|
private |