Wikibase
MediaWiki Wikibase extension
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. More...
 
 initServices (EntityLookup $entityLookup, EntityStore $entityStore, SummaryFormatter $summaryFormatter, LoggerInterface $logger, SiteLookup $siteLookup, MediawikiEditEntityFactory $editEntityFactory, SettingsArray $settings)
 
 getSummary ()
 Get a Summary object for the edit. More...
 
- Public Member Functions inherited from Wikibase\Repo\UpdateRepo\UpdateRepoJob
 run ()
 

Protected Member Functions

 initRepoJobServicesFromGlobalState ()
 Initialize repo services from global state. More...
 
 verifyValid (Item $item)
 Whether the propagated update is valid (and thus should be applied) More...
 
 applyChanges (Item $item)
 Apply the changes needed to the given Item. More...
 
- Protected Member Functions inherited from Wikibase\Repo\UpdateRepo\UpdateRepoJob
 initRepoJobServices (EntityLookup $entityLookup, EntityStore $entityStore, SummaryFormatter $summaryFormatter, LoggerInterface $logger, MediawikiEditEntityFactory $editEntityFactory, SettingsArray $settings)
 

Private Member Functions

 getSiteLink (Item $item, string $globalId)
 Get a SiteLink for a specific item and site. More...
 
 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.

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,
string  $globalId 
)
private

Get a SiteLink for a specific item and site.

◆ getSummary()

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

Get a Summary object for the edit.

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,
SettingsArray  $settings 
)

◆ verifyValid()

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

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

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: