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

Class for sitelink change operation. More...

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

Public Member Functions

 __construct (string $siteId, string $pageName, array $badges=null)
 
 apply (EntityDocument $entity, Summary $summary=null)
 
 validate (EntityDocument $entity)
 
- Public Member Functions inherited from Wikibase\Repo\ChangeOp\ChangeOpBase
 getActions ()
 

Private Member Functions

 badgesAreEmptyAndUnchanged (SiteLinkList $siteLinks)
 
 applyBadges (SiteLinkList $siteLinks, string &$action, array &$commentArgs)
 
 isSiteLinkNewOrPageNameChanged (SiteLinkList $siteLinks)
 

Private Attributes

 $siteId
 
 $pageName
 
 $badges
 

Additional Inherited Members

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

Detailed Description

Class for sitelink change operation.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::__construct ( string $siteId,
string $pageName,
array $badges = null )
Parameters
string$siteId
string$pageName
ItemId[] | null$badgesNull for no-op
Exceptions
InvalidArgumentException

Member Function Documentation

◆ apply()

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

Implements Wikibase\Repo\ChangeOp\ChangeOp.

◆ applyBadges()

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::applyBadges ( SiteLinkList $siteLinks,
string & $action,
array & $commentArgs )
private
Parameters
SiteLinkList$siteLinks
string&$action
array&$commentArgs
Returns
ItemId[]

◆ badgesAreEmptyAndUnchanged()

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::badgesAreEmptyAndUnchanged ( SiteLinkList $siteLinks)
private
Parameters
SiteLinkList$siteLinks
Returns
bool

◆ isSiteLinkNewOrPageNameChanged()

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::isSiteLinkNewOrPageNameChanged ( SiteLinkList $siteLinks)
private

◆ validate()

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::validate ( EntityDocument $entity)
See also
ChangeOp::validate
Parameters
EntityDocument$entity
Exceptions
InvalidArgumentException
Returns
Result

Implements Wikibase\Repo\ChangeOp\ChangeOp.

Member Data Documentation

◆ $badges

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::$badges
private

◆ $pageName

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::$pageName
private

◆ $siteId

Wikibase\Repo\ChangeOp\ChangeOpSiteLink::$siteId
private

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