Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink Class Reference
+ Inheritance diagram for Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink:
+ Collaboration diagram for Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink:

Public Member Functions

 __construct (string $siteId)
 
 validate (EntityDocument $entity)
 Validates the current ChangeOp.This indicates whether this ChangeOp is valid with respect to the given entity.
Parameters
EntityDocument$entity
Exceptions
InvalidArgumentExceptionwhen called with an unexpected entity type.
ChangeOpExceptionwhen the change is invalid for this entity for other reasons than the entity type.
Returns
Result

 
 apply (EntityDocument $entity, Summary $summary=null)
 Applies the change represented by this ChangeOp to the given Entity.As ChangeOp does not yet know whether it is going to change the entity or not, and since expensive validations should be run only on ChangeOps that will change the entity, ChangeOpResult::validate is recommended for such validations.
Parameters
EntityDocument$entity
Summary | null$summary
Exceptions
InvalidArgumentExceptionwhen called with an unexpected entity type.
ChangeOpExceptionwhen the change can not be applied to the entity, e.g. because the same data was edited in the meantime.
Returns
ChangeOpResult

 
- Public Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase
 getActions ()
 

Private Attributes

 $siteId
 

Additional Inherited Members

- Protected Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase
 updateSummary (?Summary $summary, $action, $language='', $args='')
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink::__construct ( string $siteId)

Member Function Documentation

◆ apply()

Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink::apply ( EntityDocument $entity,
Summary $summary = null )

Applies the change represented by this ChangeOp to the given Entity.As ChangeOp does not yet know whether it is going to change the entity or not, and since expensive validations should be run only on ChangeOps that will change the entity, ChangeOpResult::validate is recommended for such validations.

Parameters
EntityDocument$entity
Summary | null$summary
Exceptions
InvalidArgumentExceptionwhen called with an unexpected entity type.
ChangeOpExceptionwhen the change can not be applied to the entity, e.g. because the same data was edited in the meantime.
Returns
ChangeOpResult

Implements Wikibase\Repo\ChangeOp\ChangeOp.

◆ validate()

Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink::validate ( EntityDocument $entity)

Validates the current ChangeOp.This indicates whether this ChangeOp is valid with respect to the given entity.

Parameters
EntityDocument$entity
Exceptions
InvalidArgumentExceptionwhen called with an unexpected entity type.
ChangeOpExceptionwhen the change is invalid for this entity for other reasons than the entity type.
Returns
Result

Implements Wikibase\Repo\ChangeOp\ChangeOp.

Member Data Documentation

◆ $siteId

Wikibase\Repo\ChangeOp\ChangeOpRemoveSiteLink::$siteId
private

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