MediaWiki master
|
Manages user talk page notifications. More...
Public Member Functions | |
__construct (ServiceOptions $serviceOptions, IConnectionProvider $dbProvider, ReadOnlyMode $readOnlyMode, RevisionLookup $revisionLookup, HookContainer $hookContainer, UserFactory $userFactory) | |
clearForPageView (UserIdentity $user, ?RevisionRecord $oldRev=null) | |
Clear notifications when the user's own talk page is viewed. | |
clearInstanceCache (UserIdentity $user) | |
Remove the cached newtalk status for the given user. | |
getLatestSeenMessageTimestamp (UserIdentity $user) | |
Returns the timestamp of the latest revision of the user talkpage that the user has already seen in TS_MW format. | |
removeUserHasNewMessages (UserIdentity $user) | |
Remove the new messages status. | |
setUserHasNewMessages (UserIdentity $user, ?RevisionRecord $curRev=null) | |
Update the talk page messages status. | |
userHasNewMessages (UserIdentity $user) | |
Check if the user has new messages. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Manages user talk page notifications.
Definition at line 40 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::__construct | ( | ServiceOptions | $serviceOptions, |
IConnectionProvider | $dbProvider, | ||
ReadOnlyMode | $readOnlyMode, | ||
RevisionLookup | $revisionLookup, | ||
HookContainer | $hookContainer, | ||
UserFactory | $userFactory ) |
ServiceOptions | $serviceOptions | |
IConnectionProvider | $dbProvider | |
ReadOnlyMode | $readOnlyMode | |
RevisionLookup | $revisionLookup | |
HookContainer | $hookContainer | |
UserFactory | $userFactory |
Definition at line 65 of file TalkPageNotificationManager.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions(), MediaWiki\MainConfigNames\DisableAnonTalk, and MediaWiki\Config\ServiceOptions\get().
MediaWiki\User\TalkPageNotificationManager::clearForPageView | ( | UserIdentity | $user, |
?RevisionRecord | $oldRev = null ) |
Clear notifications when the user's own talk page is viewed.
UserIdentity | $user | |
RevisionRecord | null | $oldRev | If it is an old revision view, the old revision. If it is a current revision view, this should be null. |
Definition at line 110 of file TalkPageNotificationManager.php.
References getCacheKey(), and MediaWiki\User\UserIdentity\getId().
MediaWiki\User\TalkPageNotificationManager::clearInstanceCache | ( | UserIdentity | $user | ) |
Remove the cached newtalk status for the given user.
UserIdentity | $user |
Definition at line 234 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::getLatestSeenMessageTimestamp | ( | UserIdentity | $user | ) |
Returns the timestamp of the latest revision of the user talkpage that the user has already seen in TS_MW format.
If the user has no new messages, returns null
UserIdentity | $user |
Definition at line 204 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::removeUserHasNewMessages | ( | UserIdentity | $user | ) |
Remove the new messages status.
Definition at line 185 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::setUserHasNewMessages | ( | UserIdentity | $user, |
?RevisionRecord | $curRev = null ) |
Update the talk page messages status.
UserIdentity | $user | |
RevisionRecord | null | $curRev | New, as yet unseen revision of the user talk page. Null is acceptable in case the revision is not known. This will indicate that new messages exist, but will not affect the latest seen message timestamp |
Definition at line 168 of file TalkPageNotificationManager.php.
MediaWiki\User\TalkPageNotificationManager::userHasNewMessages | ( | UserIdentity | $user | ) |
Check if the user has new messages.
UserIdentity | $user |
Definition at line 87 of file TalkPageNotificationManager.php.
const MediaWiki\User\TalkPageNotificationManager::CONSTRUCTOR_OPTIONS |
Definition at line 45 of file TalkPageNotificationManager.php.