|
MediaWiki master
|
Class performing complex database queries related to WatchedItems. More...
Public Member Functions | |
| __construct (IConnectionProvider $dbProvider, WatchedItemStoreInterface $watchedItemStore, bool $expiryEnabled=false, int $maxQueryExecutionTime=0) | |
| getWatchedItemsForUser (UserIdentity $user, array $options=[]) | |
| For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser. | |
Public Attributes | |
| const | FILTER_CHANGED = 'changed' |
| const | FILTER_NOT_CHANGED = '!changed' |
| const | SORT_ASC = 'ASC' |
| const | SORT_DESC = 'DESC' |
Class performing complex database queries related to WatchedItems.
Definition at line 25 of file WatchedItemQueryService.php.
| MediaWiki\Watchlist\WatchedItemQueryService::__construct | ( | IConnectionProvider | $dbProvider, |
| WatchedItemStoreInterface | $watchedItemStore, | ||
| bool | $expiryEnabled = false, | ||
| int | $maxQueryExecutionTime = 0 ) |
Definition at line 54 of file WatchedItemQueryService.php.
| MediaWiki\Watchlist\WatchedItemQueryService::getWatchedItemsForUser | ( | UserIdentity | $user, |
| array | $options = [] ) |
For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser.
| UserIdentity | $user | |
| array | $options | Allowed keys: 'sort' => string optional sorting by namespace ID and title one of the self::SORT_* constants 'namespaceIds' => int[] optional namespace IDs to filter by (defaults to all namespaces) 'limit' => int maximum number of items to return 'filter' => string optional filter, one of the self::FILTER_* constants 'from' => PageReference|LinkTarget requires 'sort' key, only return items starting from those related to the link target 'until' => PageReference|LinkTarget requires 'sort' key, only return items until those related to the link target 'startFrom' => PageReference|LinkTarget requires 'sort' key, only return items starting from those related to the link target, allows to skip some link targets specified using the form option |
Definition at line 85 of file WatchedItemQueryService.php.
References MediaWiki\User\UserIdentity\isRegistered().
| const MediaWiki\Watchlist\WatchedItemQueryService::FILTER_CHANGED = 'changed' |
Definition at line 30 of file WatchedItemQueryService.php.
| const MediaWiki\Watchlist\WatchedItemQueryService::FILTER_NOT_CHANGED = '!changed' |
Definition at line 31 of file WatchedItemQueryService.php.
| const MediaWiki\Watchlist\WatchedItemQueryService::SORT_ASC = 'ASC' |
Definition at line 33 of file WatchedItemQueryService.php.
| const MediaWiki\Watchlist\WatchedItemQueryService::SORT_DESC = 'DESC' |
Definition at line 34 of file WatchedItemQueryService.php.