Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob Class Reference

Job for updating the repo after a page on the client has been moved. More...

+ Inheritance diagram for Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob:
+ Collaboration diagram for Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob:

Public Member Functions

 __construct (Title $title, array $params=[])
 Constructs a UpdateRepoOnMoveJob propagating a page move to the repo.
 
 initServices (EntityLookup $entityLookup, EntityStore $entityStore, SummaryFormatter $summaryFormatter, LoggerInterface $logger, SiteLookup $siteLookup, MediawikiEditEntityFactory $editEntityFactory)
 
 getSummary ()
 Get a Summary object for the edit.
 
- Public Member Functions inherited from Wikibase\Repo\UpdateRepo\UpdateRepoJob
 run ()
 

Protected Member Functions

 initRepoJobServicesFromGlobalState ()
 Initialize repo services from global state.
 
 verifyValid (Item $item)
 Whether the propagated update is valid (and thus should be applied)
 
 applyChanges (Item $item)
 Apply the changes needed to the given Item.
Parameters
Item$item
Returns
bool

 
- Protected Member Functions inherited from Wikibase\Repo\UpdateRepo\UpdateRepoJob
 initRepoJobServices (EntityLookup $entityLookup, EntityStore $entityStore, SummaryFormatter $summaryFormatter, LoggerInterface $logger, MediawikiEditEntityFactory $editEntityFactory)
 

Private Member Functions

 getSiteLink (Item $item, $globalId)
 Get a SiteLink for a specific item and site.
 
 getNormalizedPageName ()
 

Private Attributes

 $siteLookup
 
 $normalizedPageName = null
 

Additional Inherited Members

- Protected Attributes inherited from Wikibase\Repo\UpdateRepo\UpdateRepoJob
 $entityLookup
 
 $entityStore
 
 $summaryFormatter
 
 $logger
 

Detailed Description

Job for updating the repo after a page on the client has been moved.

Author
Marius Hoch < hoo@o.nosp@m.nlin.nosp@m.e.de >

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::__construct ( Title  $title,
array  $params = [] 
)

Constructs a UpdateRepoOnMoveJob propagating a page move to the repo.

Note
This is for use by Job::factory, don't call it directly; use newFrom*() instead.
the constructor's signature is dictated by Job::factory, so we'll have to live with it even though it's rather ugly for our use case.
See also
Job::factory
UpdateRepoJob::__construct
Parameters
Title$title
array$params

Member Function Documentation

◆ applyChanges()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::applyChanges ( Item  $item)
protected

Apply the changes needed to the given Item.

Parameters
Item$item
Returns
bool

Reimplemented from Wikibase\Repo\UpdateRepo\UpdateRepoJob.

◆ getNormalizedPageName()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::getNormalizedPageName ( )
private
Returns
string|bool False in case the normalization failed

◆ getSiteLink()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::getSiteLink ( Item  $item,
  $globalId 
)
private

Get a SiteLink for a specific item and site.

Parameters
Item$item
string$globalId
Returns
SiteLink|null

◆ getSummary()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::getSummary ( )

Get a Summary object for the edit.

Returns
Summary

Reimplemented from Wikibase\Repo\UpdateRepo\UpdateRepoJob.

◆ initRepoJobServicesFromGlobalState()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::initRepoJobServicesFromGlobalState ( )
protected

Initialize repo services from global state.

Reimplemented from Wikibase\Repo\UpdateRepo\UpdateRepoJob.

◆ initServices()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::initServices ( EntityLookup  $entityLookup,
EntityStore  $entityStore,
SummaryFormatter  $summaryFormatter,
LoggerInterface  $logger,
SiteLookup  $siteLookup,
MediawikiEditEntityFactory  $editEntityFactory 
)

◆ verifyValid()

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::verifyValid ( Item  $item)
protected

Whether the propagated update is valid (and thus should be applied)

Parameters
Item$item
Returns
bool

Reimplemented from Wikibase\Repo\UpdateRepo\UpdateRepoJob.

Member Data Documentation

◆ $normalizedPageName

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::$normalizedPageName = null
private

◆ $siteLookup

Wikibase\Repo\UpdateRepo\UpdateRepoOnMoveJob::$siteLookup
private

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