MediaWiki
1.32.5
|
Public Member Functions | |
addWatch (User $user, LinkTarget $target) | |
Must be called separately for Subject & Talk namespaces. More... | |
addWatchBatchForUser (User $user, array $targets) | |
clearUserWatchedItems (User $user) | |
Queues a job that will clear the users watchlist using the Job Queue. More... | |
clearUserWatchedItemsUsingJobQueue (User $user) | |
Queues a job that will clear the users watchlist using the Job Queue. More... | |
countUnreadNotifications (User $user, $unreadLimit=null) | |
countVisitingWatchers (LinkTarget $target, $threshold) | |
Number of page watchers who also visited a "recent" edit. More... | |
countVisitingWatchersMultiple (array $targetsWithVisitThresholds, $minimumWatchers=null) | |
Number of watchers of each page who have visited recent edits to that page. More... | |
countWatchedItems (User $user) | |
Count the number of individual items that are watched by the user. More... | |
countWatchers (LinkTarget $target) | |
countWatchersMultiple (array $targets, array $options=[]) | |
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. More... | |
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. More... | |
getNotificationTimestampsBatch (User $user, array $targets) | |
getWatchedItem (User $user, LinkTarget $target) | |
Get an item (may be cached) More... | |
getWatchedItemsForUser (User $user, array $options=[]) | |
isWatched (User $user, LinkTarget $target) | |
Must be called separately for Subject & Talk namespaces. More... | |
loadWatchedItem (User $user, LinkTarget $target) | |
Loads an item from the db. More... | |
removeWatch (User $user, LinkTarget $target) | |
Removes the an entry for the User watching the LinkTarget Must be called separately for Subject & Talk namespaces. More... | |
resetAllNotificationTimestampsForUser (User $user) | |
Reset all watchlist notificaton timestamps for a user using the job queue. More... | |
resetNotificationTimestamp (User $user, Title $title, $force='', $oldid=0) | |
Reset the notification timestamp of this entry. More... | |
setNotificationTimestampsForUser (User $user, $timestamp, array $targets=[]) | |
updateNotificationTimestamp (User $editor, LinkTarget $target, $timestamp) | |
Public Attributes | |
const | SORT_ASC = 'ASC' |
const | SORT_DESC = 'DESC' |
Definition at line 28 of file WatchedItemStoreInterface.php.
WatchedItemStoreInterface::addWatch | ( | User | $user, |
LinkTarget | $target | ||
) |
Must be called separately for Subject & Talk namespaces.
User | $user | |
LinkTarget | $target |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
User | $user | |
LinkTarget[] | $targets |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::clearUserWatchedItems | ( | User | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
User | $user |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::clearUserWatchedItemsUsingJobQueue | ( | User | $user | ) |
Queues a job that will clear the users watchlist using the Job Queue.
User | $user |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::countUnreadNotifications | ( | User | $user, |
$unreadLimit = null |
|||
) |
User | $user | |
int | null | $unreadLimit |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::countVisitingWatchers | ( | LinkTarget | $target, |
$threshold | |||
) |
Number of page watchers who also visited a "recent" edit.
LinkTarget | $target | |
mixed | $threshold | timestamp accepted by wfTimestamp |
DBUnexpectedError | |
MWException |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::countVisitingWatchersMultiple | ( | array | $targetsWithVisitThresholds, |
$minimumWatchers = null |
|||
) |
Number of watchers of each page who have visited recent edits to that page.
array | $targetsWithVisitThresholds | array of pairs (LinkTarget $target, mixed $threshold), $threshold is:
|
int | null | $minimumWatchers |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::countWatchedItems | ( | User | $user | ) |
Count the number of individual items that are watched by the user.
If a subject and corresponding talk page are watched this will return 2.
User | $user |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::countWatchers | ( | LinkTarget | $target | ) |
LinkTarget | $target |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
LinkTarget[] | $targets | |
array | $options | Allowed keys: 'minimumWatchers' => int |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::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.
To be used for page renames and such.
LinkTarget | $oldTarget | |
LinkTarget | $newTarget |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::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.
To be used for page renames and such. This must be called separately for Subject and Talk pages
LinkTarget | $oldTarget | |
LinkTarget | $newTarget |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
User | $user | |
LinkTarget[] | $targets |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::getWatchedItem | ( | User | $user, |
LinkTarget | $target | ||
) |
Get an item (may be cached)
User | $user | |
LinkTarget | $target |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
User | $user | |
array | $options | Allowed keys: 'forWrite' => bool defaults to false 'sort' => string optional sorting by namespace ID and title one of the self::SORT_* constants |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::isWatched | ( | User | $user, |
LinkTarget | $target | ||
) |
Must be called separately for Subject & Talk namespaces.
User | $user | |
LinkTarget | $target |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::loadWatchedItem | ( | User | $user, |
LinkTarget | $target | ||
) |
Loads an item from the db.
User | $user | |
LinkTarget | $target |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::removeWatch | ( | User | $user, |
LinkTarget | $target | ||
) |
Removes the an entry for the User watching the LinkTarget Must be called separately for Subject & Talk namespaces.
User | $user | |
LinkTarget | $target |
DBUnexpectedError | |
MWException |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::resetAllNotificationTimestampsForUser | ( | User | $user | ) |
Reset all watchlist notificaton timestamps for a user using the job queue.
User | $user | The user to reset the timestamps for |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::resetNotificationTimestamp | ( | User | $user, |
Title | $title, | ||
$force = '' , |
|||
$oldid = 0 |
|||
) |
Reset the notification timestamp of this entry.
User | $user | |
Title | $title | |
string | $force | Whether to force the write query to be executed even if the page is not watched or the notification timestamp is already NULL. 'force' in order to force |
int | $oldid | The revision id being viewed. If not given or 0, latest revision is assumed. |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::setNotificationTimestampsForUser | ( | User | $user, |
$timestamp, | |||
array | $targets = [] |
||
) |
User | $user | The user to set the timestamps for |
string | null | $timestamp | Set the update timestamp to this value |
LinkTarget[] | $targets | List of targets to update. Default to all targets |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
WatchedItemStoreInterface::updateNotificationTimestamp | ( | User | $editor, |
LinkTarget | $target, | ||
$timestamp | |||
) |
User | $editor | The editor that triggered the update. Their notification timestamp will not be updated(they have already seen it) |
LinkTarget | $target | The target to update timestamps for |
string | $timestamp | Set the update timestamp to this value |
Implemented in WatchedItemStore, and NoWriteWatchedItemStore.
const WatchedItemStoreInterface::SORT_ASC = 'ASC' |
Definition at line 33 of file WatchedItemStoreInterface.php.
Referenced by SpecialEditWatchlist\getWatchlistInfo(), ApiQueryWatchlistRaw\run(), and WatchedItemStoreUnitTest\testGetWatchedItemsForUser_optionsAndEmptyResult().
const WatchedItemStoreInterface::SORT_DESC = 'DESC' |
Definition at line 38 of file WatchedItemStoreInterface.php.
Referenced by ApiQueryWatchlistRaw\run().