Class for statement modification operations.
More...
|
| __construct (Statement $statement, GuidGenerator $guidGenerator, StatementGuidValidator $guidValidator, StatementGuidParser $guidParser, SnakValidator $snakValidator, $index=null) |
|
| apply (EntityDocument $entity, Summary $summary=null) |
|
| validate (EntityDocument $entity) |
|
| getActions () |
|
Class for statement modification operations.
- Copyright
- GPL-2.0-or-later
◆ __construct()
Wikibase\Repo\ChangeOp\ChangeOpStatement::__construct |
( |
Statement |
$statement, |
|
|
GuidGenerator |
$guidGenerator, |
|
|
StatementGuidValidator |
$guidValidator, |
|
|
StatementGuidParser |
$guidParser, |
|
|
SnakValidator |
$snakValidator, |
|
|
|
$index = null |
|
) |
| |
- Parameters
-
Statement | $statement | |
GuidGenerator | $guidGenerator | |
StatementGuidValidator | $guidValidator | |
StatementGuidParser | $guidParser | |
SnakValidator | $snakValidator | |
int | null | $index | Where the statement should be placed among the other statements. |
- Exceptions
-
◆ addStatementToGroup()
Wikibase\Repo\ChangeOp\ChangeOpStatement::addStatementToGroup |
( |
StatementList |
$statements, |
|
|
|
$index |
|
) |
| |
|
private |
- Parameters
-
StatementList | $statements | |
int | $index | |
- Returns
- Statement[]
◆ apply()
Wikibase\Repo\ChangeOp\ChangeOpStatement::apply |
( |
EntityDocument |
$entity, |
|
|
Summary |
$summary = null |
|
) |
| |
- See also
- ChangeOp::apply
- Parameters
-
EntityDocument | $entity | |
Summary | null | $summary | |
- Exceptions
-
InvalidArgumentException | |
ChangeOpException | |
Implements Wikibase\Repo\ChangeOp\ChangeOp.
◆ checkMainSnakUpdate()
Wikibase\Repo\ChangeOp\ChangeOpStatement::checkMainSnakUpdate |
( |
Statement |
$oldStatement | ) |
|
|
private |
Checks that the update of the main snak is permissible.
This checks that the main snaks of the old and the new statement refer to the same property.
- Parameters
-
- Exceptions
-
ChangeOpException | If the main snak update is illegal. |
◆ removeStatement()
Wikibase\Repo\ChangeOp\ChangeOpStatement::removeStatement |
( |
StatementList |
$statements | ) |
|
|
private |
- Parameters
-
- Returns
- int|null
◆ validate()
Wikibase\Repo\ChangeOp\ChangeOpStatement::validate |
( |
EntityDocument |
$entity | ) |
|
◆ validateStatementGuid()
Wikibase\Repo\ChangeOp\ChangeOpStatement::validateStatementGuid |
( |
EntityId |
$entityId | ) |
|
|
private |
◆ $guidGenerator
Wikibase\Repo\ChangeOp\ChangeOpStatement::$guidGenerator |
|
private |
◆ $guidParser
Wikibase\Repo\ChangeOp\ChangeOpStatement::$guidParser |
|
private |
◆ $guidValidator
Wikibase\Repo\ChangeOp\ChangeOpStatement::$guidValidator |
|
private |
◆ $index
Wikibase\Repo\ChangeOp\ChangeOpStatement::$index |
|
private |
◆ $snakValidator
Wikibase\Repo\ChangeOp\ChangeOpStatement::$snakValidator |
|
private |
◆ $statement
Wikibase\Repo\ChangeOp\ChangeOpStatement::$statement |
|
private |
The documentation for this class was generated from the following file: