Go to the documentation of this file.
48 return $this->actualStore->countWatchedItems( $user );
52 return $this->actualStore->countWatchers( $target );
56 return $this->actualStore->countVisitingWatchers( $target, $threshold );
60 return $this->actualStore->countVisitingWatchersMultiple(
62 $options[
'minimumWatchers'] ??
null
67 array $targetsWithVisitThresholds,
68 $minimumWatchers =
null
70 return $this->actualStore->countVisitingWatchersMultiple(
71 $targetsWithVisitThresholds,
77 return $this->actualStore->getWatchedItem( $user, $target );
81 return $this->actualStore->loadWatchedItem( $user, $target );
85 return $this->actualStore->getWatchedItemsForUser( $user, $options );
89 return $this->actualStore->isWatched( $user, $target );
93 return $this->actualStore->getNotificationTimestampsBatch( $user, $targets );
97 return $this->actualStore->countUnreadNotifications( $user, $unreadLimit );
isWatched(UserIdentity $user, LinkTarget $target)
Must be called separately for Subject & Talk namespaces.
loadWatchedItem(UserIdentity $user, LinkTarget $target)
Loads an item from the db.
clearUserWatchedItems(UserIdentity $user)
Queues a job that will clear the users watchlist using the Job Queue.
removeWatchBatchForUser(UserIdentity $user, array $titles)
getWatchedItemsForUser(UserIdentity $user, array $options=[])
resetNotificationTimestamp(UserIdentity $user, LinkTarget $title, $force='', $oldid=0)
Reset the notification timestamp of this entry.
countVisitingWatchers(LinkTarget $target, $threshold)
Number of page watchers who also visited a "recent" edit.
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.
addWatch(UserIdentity $user, LinkTarget $target)
Must be called separately for Subject & Talk namespaces.
getNotificationTimestampsBatch(UserIdentity $user, array $targets)
countWatchersMultiple(array $targets, array $options=[])
__construct(WatchedItemStoreInterface $actualStore)
Initialy set WatchedItemStore that will be used in cases where writing is not needed.
WatchedItemStoreInterface $actualStore
clearUserWatchedItemsUsingJobQueue(UserIdentity $user)
Queues a job that will clear the users watchlist using the Job Queue.
wfTimestampOrNull( $outputtype=TS_UNIX, $ts=null)
Return a formatted timestamp, or null if input is null.
setNotificationTimestampsForUser(UserIdentity $user, $timestamp, array $targets=[])
countWatchedItems(UserIdentity $user)
Count the number of individual items that are watched by the user.
updateNotificationTimestamp(UserIdentity $editor, LinkTarget $target, $timestamp)
removeWatch(UserIdentity $user, LinkTarget $target)
Removes an entry for the UserIdentity watching the LinkTarget Must be called separately for Subject &...
getLatestNotificationTimestamp( $timestamp, UserIdentity $user, LinkTarget $target)
Convert $timestamp to TS_MW or return null if the page was visited since then by $user.
countWatchers(LinkTarget $target)
addWatchBatchForUser(UserIdentity $user, array $targets)
countVisitingWatchersMultiple(array $targetsWithVisitThresholds, $minimumWatchers=null)
Number of watchers of each page who have visited recent edits to that page.
resetAllNotificationTimestampsForUser(UserIdentity $user)
Reset all watchlist notificaton timestamps for a user using the job queue.
countUnreadNotifications(UserIdentity $user, $unreadLimit=null)
getWatchedItem(UserIdentity $user, LinkTarget $target)
Get an item (may be cached)