Class for label change operation.
More...
Class for label change operation.
- Copyright
- GPL-2.0-or-later
- Author
- Tobias Gritschacher < tobia.nosp@m.s.gr.nosp@m.itsch.nosp@m.ache.nosp@m.r@wik.nosp@m.imed.nosp@m.ia.de >
-
Daniel Kinzler
-
Thiemo Kreuz
◆ __construct()
| Wikibase\Repo\ChangeOp\ChangeOpLabel::__construct |
( |
| $languageCode, |
|
|
| $label, |
|
|
TermValidatorFactory | $termValidatorFactory ) |
- Parameters
-
| string | $languageCode | |
| string | null | $label | |
| TermValidatorFactory | $termValidatorFactory | |
- Exceptions
-
◆ apply()
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
-
| 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. |
- Returns
- ChangeOpResult
Implements Wikibase\Repo\ChangeOp\ChangeOp.
◆ buildResult()
| Wikibase\Repo\ChangeOp\ChangeOpLabel::buildResult |
( |
?EntityId | $entityId, |
|
|
?Term | $oldLabel, |
|
|
?Term | $newLabel ) |
|
private |
- Parameters
-
| EntityId | null | $entityId | |
| Term | null | $oldLabel | |
| Term | null | $newLabel | |
- Returns
- ChangeOpLabelResult
◆ getActions()
| Wikibase\Repo\ChangeOp\ChangeOpLabel::getActions |
( |
| ) |
|
◆ updateLabels()
| Wikibase\Repo\ChangeOp\ChangeOpLabel::updateLabels |
( |
TermList | $labels | ) |
|
|
private |
Applies the change to the labels.
◆ validate()
| Wikibase\Repo\ChangeOp\ChangeOpLabel::validate |
( |
EntityDocument | $entity | ) |
|
◆ $label
| Wikibase\Repo\ChangeOp\ChangeOpLabel::$label |
|
private |
◆ $languageCode
| Wikibase\Repo\ChangeOp\ChangeOpLabel::$languageCode |
|
private |
◆ $termValidatorFactory
| Wikibase\Repo\ChangeOp\ChangeOpLabel::$termValidatorFactory |
|
private |
The documentation for this class was generated from the following file: