Go to the documentation of this file.
111 array $targetsWithVisitThresholds,
112 $minimumWatchers =
null
423 public function removeExpired(
int $limit,
bool $deleteOrphans =
false ): void;
getNotificationTimestampsBatch(UserIdentity $user, array $targets)
loadWatchedItemsBatch(UserIdentity $user, array $targets)
Loads a set of WatchedItems from the db.
countWatchersMultiple(array $targets, array $options=[])
addWatchBatchForUser(UserIdentity $user, array $targets, ?string $expiry=null)
countUnreadNotifications(UserIdentity $user, $unreadLimit=null)
clearUserWatchedItemsUsingJobQueue(UserIdentity $user)
Queues a job that will clear the users watchlist using the Job Queue.
updateNotificationTimestamp(UserIdentity $editor, LinkTarget $target, $timestamp)
duplicateEntry(LinkTarget $oldTarget, LinkTarget $newTarget)
Check if the given title already is watched by the user, and if so add a watch for the new title.
duplicateAllAssociatedEntries(LinkTarget $oldTarget, LinkTarget $newTarget)
Check if the given title already is watched by the user, and if so add a watch for the new title.
getLatestNotificationTimestamp( $timestamp, UserIdentity $user, LinkTarget $target)
Convert $timestamp to TS_MW or return null if the page was visited since then by $user.
getWatchedItemsForUser(UserIdentity $user, array $options=[])
removeExpired(int $limit, bool $deleteOrphans=false)
Remove some number of expired watchlist items.
countVisitingWatchers(LinkTarget $target, $threshold)
Number of page watchers who also visited a "recent" edit.
countWatchers(LinkTarget $target)
resetNotificationTimestamp(UserIdentity $user, LinkTarget $title, $force='', $oldid=0)
Reset the notification timestamp of this entry.
countVisitingWatchersMultiple(array $targetsWithVisitThresholds, $minimumWatchers=null)
Number of watchers of each page who have visited recent edits to that page.
isWatched(UserIdentity $user, LinkTarget $target)
Must be called separately for Subject & Talk namespaces.
getWatchedItem(UserIdentity $user, LinkTarget $target)
Get an item (may be cached)
loadWatchedItem(UserIdentity $user, LinkTarget $target)
Loads an item from the db.
setNotificationTimestampsForUser(UserIdentity $user, $timestamp, array $targets=[])
removeWatchBatchForUser(UserIdentity $user, array $targets)
enqueueWatchlistExpiryJob(float $watchlistPurgeRate)
Probabilistically add a job to purge the expired watchlist items.
isTempWatched(UserIdentity $user, LinkTarget $target)
Whether the page is only being watched temporarily (has expiry).
resetAllNotificationTimestampsForUser(UserIdentity $user, $timestamp=null)
Reset all watchlist notificaton timestamps for a user using the job queue.
countWatchedItems(UserIdentity $user)
Count the number of individual items that are watched by the user.
clearUserWatchedItems(UserIdentity $user)
Synchronously clear the users watchlist.
addWatch(UserIdentity $user, LinkTarget $target, ?string $expiry=null)
Must be called separately for Subject & Talk namespaces.
removeWatch(UserIdentity $user, LinkTarget $target)
Removes an entry for the UserIdentity watching the LinkTarget Must be called separately for Subject &...
mustClearWatchedItemsUsingJobQueue(UserIdentity $user)
Does the size of the users watchlist require clearUserWatchedItemsUsingJobQueue() to be used instead ...
countExpired()
Get the number of watchlist items that expire before the current time.