|
Wikibase
MediaWiki Wikibase extension
|
Class for aliases change operation. More...
Public Member Functions | |||||||||||
| __construct ( $languageCode, array $aliases, $action, TermValidatorFactory $termValidatorFactory) | |||||||||||
| 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.
| |||||||||||
| validate (EntityDocument $entity) | |||||||||||
| getActions () | |||||||||||
Private Member Functions | |
| updateAliases (AliasGroupList $aliases) | |
| Applies the change to the aliases. | |
Private Attributes | |
| $languageCode | |
| $aliases | |
| $action | |
| $termValidatorFactory | |
Additional Inherited Members | |
| Protected Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase | |
| updateSummary (?Summary $summary, $action, $language='', $args='') | |
Class for aliases change operation.
| Wikibase\Repo\ChangeOp\ChangeOpAliases::__construct | ( | $languageCode, | |
| array | $aliases, | ||
| $action, | |||
| TermValidatorFactory | $termValidatorFactory ) |
| string | $languageCode | |
| string[] | $aliases | |
| string | $action | should be set|add|remove |
| TermValidatorFactory | $termValidatorFactory |
| InvalidArgumentException |
| Wikibase\Repo\ChangeOp\ChangeOpAliases::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.
| EntityDocument | $entity | |
| Summary | null | $summary |
| InvalidArgumentException | when called with an unexpected entity type. |
| ChangeOpException | when the change can not be applied to the entity, e.g. because the same data was edited in the meantime. |
Implements Wikibase\Repo\ChangeOp\ChangeOp.
| Wikibase\Repo\ChangeOp\ChangeOpAliases::getActions | ( | ) |
Reimplemented from Wikibase\Repo\ChangeOp\ChangeOpBase.
|
private |
Applies the change to the aliases.
| AliasGroupList | $aliases |
| ChangeOpException |
| Wikibase\Repo\ChangeOp\ChangeOpAliases::validate | ( | EntityDocument | $entity | ) |
| EntityDocument | $entity |
| ChangeOpException |
Implements Wikibase\Repo\ChangeOp\ChangeOp.
|
private |
|
private |
|
private |
|
private |