Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\ChangeOp\ChangeOpDescription Class Reference

Class for description change operation. More...

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

Public Member Functions

 __construct ( $languageCode, $description, TermValidatorFactory $termValidatorFactory)
 
 apply (EntityDocument $entity, Summary $summary=null)
 
 validate (EntityDocument $entity)
 
 getActions ()
 

Private Member Functions

 updateDescriptions (TermList $descriptions)
 Applies the change to the descriptions.
 
 buildResult (EntityId $entityId=null, Term $oldDescription=null, Term $newDescription=null)
 

Private Attributes

 $languageCode
 
 $description
 
 $termValidatorFactory
 

Additional Inherited Members

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

Detailed Description

Class for description 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 >
Daniel Kinzler
Thiemo Kreuz

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\ChangeOpDescription::__construct (   $languageCode,
  $description,
TermValidatorFactory  $termValidatorFactory 
)
Parameters
string$languageCode
string | null$description
TermValidatorFactory$termValidatorFactory
Exceptions
InvalidArgumentException

Member Function Documentation

◆ apply()

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

Implements Wikibase\Repo\ChangeOp\ChangeOp.

◆ buildResult()

Wikibase\Repo\ChangeOp\ChangeOpDescription::buildResult ( EntityId  $entityId = null,
Term  $oldDescription = null,
Term  $newDescription = null 
)
private
Parameters
EntityId | null$entityId
Term | null$oldDescription
Term | null$newDescription
Returns
ChangeOpDescriptionResult

◆ getActions()

Wikibase\Repo\ChangeOp\ChangeOpDescription::getActions ( )
See also
ChangeOp::getActions
Returns
string[]

Reimplemented from Wikibase\Repo\ChangeOp\ChangeOpBase.

◆ updateDescriptions()

Wikibase\Repo\ChangeOp\ChangeOpDescription::updateDescriptions ( TermList  $descriptions)
private

Applies the change to the descriptions.

Parameters
TermList$descriptions

◆ validate()

Wikibase\Repo\ChangeOp\ChangeOpDescription::validate ( EntityDocument  $entity)
See also
ChangeOp::validate
Parameters
EntityDocument$entity
Exceptions
InvalidArgumentException
Returns
Result PhanUndeclaredMethod Phan is confused by intersection types

Implements Wikibase\Repo\ChangeOp\ChangeOp.

Member Data Documentation

◆ $description

Wikibase\Repo\ChangeOp\ChangeOpDescription::$description
private

◆ $languageCode

Wikibase\Repo\ChangeOp\ChangeOpDescription::$languageCode
private

◆ $termValidatorFactory

Wikibase\Repo\ChangeOp\ChangeOpDescription::$termValidatorFactory
private

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