Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\ChangeOp\ChangeOpStatementRank Class Reference

Class for statement rank change operation. More...

+ Inheritance diagram for Wikibase\Repo\ChangeOp\ChangeOpStatementRank:
+ Collaboration diagram for Wikibase\Repo\ChangeOp\ChangeOpStatementRank:

Public Member Functions

 __construct ( $statementGuid, $rank)
 Constructs a new statement rank change operation. More...
 
 apply (EntityDocument $entity, Summary $summary=null)
 
 validate (EntityDocument $entity)
 
- Public Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase
 getActions ()
 

Protected Member Functions

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

Private Attributes

 $statementGuid
 
 $rank
 

Detailed Description

Class for statement rank change operation.

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 >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\ChangeOpStatementRank::__construct (   $statementGuid,
  $rank 
)

Constructs a new statement rank change operation.

Parameters
string$statementGuid
int$rank
Exceptions
InvalidArgumentException

Member Function Documentation

◆ apply()

Wikibase\Repo\ChangeOp\ChangeOpStatementRank::apply ( EntityDocument  $entity,
Summary  $summary = null 
)
See also
ChangeOp::apply()
Parameters
EntityDocument$entity
Summary | null$summary
Exceptions
InvalidArgumentException
ChangeOpException

Implements Wikibase\Repo\ChangeOp\ChangeOp.

◆ getSnakSummaryArgs()

Wikibase\Repo\ChangeOp\ChangeOpStatementRank::getSnakSummaryArgs ( Snak  $snak)
protected
Parameters
Snak$snak
Returns
array

◆ validate()

Wikibase\Repo\ChangeOp\ChangeOpStatementRank::validate ( EntityDocument  $entity)
See also
ChangeOp::validate
Parameters
EntityDocument$entity
Returns
Result Always successful.

Implements Wikibase\Repo\ChangeOp\ChangeOp.

Member Data Documentation

◆ $rank

Wikibase\Repo\ChangeOp\ChangeOpStatementRank::$rank
private

◆ $statementGuid

Wikibase\Repo\ChangeOp\ChangeOpStatementRank::$statementGuid
private

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