Wikibase
MediaWiki Wikibase extension
|
Class for generating and submitting change notifications in different situations. More...
Public Member Functions | |
__construct (EntityChangeFactory $changeFactory, array $changeTransmitters, CentralIdLookup $centralIdLookup=null) | |
notifyOnPageDeleted (EntityContent $content, User $user, $timestamp) | |
This method constructs and sends the appropriate notifications (if any) when a wiki page containing an EntityContent was deleted. | |
notifyOnPageModified (RevisionRecord $current, RevisionRecord $parent) | |
This method constructs and sends the appropriate notifications (if any) when a wiki page containing an EntityContent was modified. | |
Private Member Functions | |
getCentralUserId (User $user) | |
getChangeForModification (EntityContent $oldContent, EntityContent $newContent) | |
Returns a EntityChange based on the old and new content object, taking redirects into consideration. | |
transmitChange (EntityChange $change) | |
Transmit changes via all registered transmitters. | |
Private Attributes | |
$changeFactory | |
$changeTransmitters | |
$centralIdLookup | |
Class for generating and submitting change notifications in different situations.
This is a helper intended for use in hook handler functions.
Wikibase\Repo\Notifications\ChangeNotifier::__construct | ( | EntityChangeFactory | $changeFactory, |
array | $changeTransmitters, | ||
CentralIdLookup | $centralIdLookup = null |
||
) |
EntityChangeFactory | $changeFactory | |
ChangeTransmitter[] | $changeTransmitters | |
CentralIdLookup | null | $centralIdLookup | CentralIdLookup, or null if this repository is not connected to a central user system, |
|
private |
User | $user | Repository user |
|
private |
Returns a EntityChange based on the old and new content object, taking redirects into consideration.
EntityContent | $oldContent | |
EntityContent | $newContent |
Wikibase\Repo\Notifications\ChangeNotifier::notifyOnPageDeleted | ( | EntityContent | $content, |
User | $user, | ||
$timestamp | |||
) |
This method constructs and sends the appropriate notifications (if any) when a wiki page containing an EntityContent was deleted.
EntityContent | $content | |
User | $user | |
string | $timestamp | timestamp in TS_MW format. |
InvalidArgumentException | |
ChangeTransmitterException |
Wikibase\Repo\Notifications\ChangeNotifier::notifyOnPageModified | ( | RevisionRecord | $current, |
RevisionRecord | $parent | ||
) |
This method constructs and sends the appropriate notifications (if any) when a wiki page containing an EntityContent was modified.
RevisionRecord | $current | |
RevisionRecord | $parent |
InvalidArgumentException | |
ChangeTransmitterException |
|
private |
Transmit changes via all registered transmitters.
EntityChange | $change |
|
private |
|
private |
|
private |