Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory Class Reference

Factory for creating EntityChange objects for repo wiki page actions that clients need to be notified for. More...

Public Member Functions

 __construct (EntityChangeFactory $changeFactory, ?CentralIdLookup $centralIdLookup)
 
 newForPageDeleted (EntityContent $content, UserIdentity $user, string $timestamp)
 
 newForPageUndeleted (EntityContent $content, RevisionRecord $revisionRecord)
 
 newForPageCreated (EntityContent $content, RevisionRecord $revisionRecord)
 

Private Member Functions

 getChangeForModification (?EntityDocument $oldEntity, ?EntityDocument $newEntity)
 Returns a EntityChange based on the old and new content object, taking redirects into consideration.
 
 getCentralUserId (UserIdentity $user)
 
 setEntityChangeUserInfo (EntityChange $change, UserIdentity $user, $centralUserId)
 
 setEntityChangeRevisionInfo (EntityChange $change, RevisionRecord $revision, int $centralUserId)
 

Private Attributes

 $changeFactory
 
 $centralIdLookup
 

Detailed Description

Factory for creating EntityChange objects for repo wiki page actions that clients need to be notified for.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::__construct ( EntityChangeFactory $changeFactory,
?CentralIdLookup $centralIdLookup )

Member Function Documentation

◆ getCentralUserId()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::getCentralUserId ( UserIdentity $user)
private
Parameters
UserIdentity$userRepository user
Returns
int Central user ID, or 0

◆ getChangeForModification()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::getChangeForModification ( ?EntityDocument $oldEntity,
?EntityDocument $newEntity )
private

Returns a EntityChange based on the old and new content object, taking redirects into consideration.

◆ newForPageCreated()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::newForPageCreated ( EntityContent $content,
RevisionRecord $revisionRecord )

◆ newForPageDeleted()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::newForPageDeleted ( EntityContent $content,
UserIdentity $user,
string $timestamp )

◆ newForPageUndeleted()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::newForPageUndeleted ( EntityContent $content,
RevisionRecord $revisionRecord )

◆ setEntityChangeRevisionInfo()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::setEntityChangeRevisionInfo ( EntityChange $change,
RevisionRecord $revision,
int $centralUserId )
private
Parameters
EntityChange$change
RevisionRecord$revisionRevision to populate EntityChange from
int$centralUserIdCentral user ID, or 0 if unknown or not applicable (see docs/change-propagation.md)

◆ setEntityChangeUserInfo()

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::setEntityChangeUserInfo ( EntityChange $change,
UserIdentity $user,
$centralUserId )
private
Parameters
EntityChange$change
UserIdentity$userUser that made change
int$centralUserIdCentral user ID, or 0 if unknown or not applicable (see docs/change-propagation.md)

Member Data Documentation

◆ $centralIdLookup

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::$centralIdLookup
private

◆ $changeFactory

Wikibase\Repo\Notifications\WikiPageActionEntityChangeFactory::$changeFactory
private

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