|
MediaWiki master
|
Service class for storage of watchlist labels. More...
Public Member Functions | |
| __construct (private IConnectionProvider $dbProvider, private LoggerInterface $logger, private Config $config) | |
| countAllForUser (UserIdentity $user) | |
| Get the current total count of a user's watchlist labels. | |
| countItems (array $labelIds) | |
| Get counts of all items with the given labels. | |
| delete (UserIdentity $user, array $ids) | |
| Delete a set of watchlist labels, by ID. | |
| loadAllForUser (UserIdentity $user) | |
| Get all of a user's watchlist labels. | |
| loadById (UserIdentity $user, int $id) | |
| Load a single watchlist label by ID. | |
| loadByName (UserIdentity $user, string $name) | |
| Load a single watchlist label by (normalized) name. | |
| save (WatchlistLabel $label) | |
| Save a watchlist label to the database. | |
Public Attributes | |
| const | TABLE_WATCHLIST_LABEL = 'watchlist_label' |
| const | TABLE_WATCHLIST_LABEL_MEMBER = 'watchlist_label_member' |
Service class for storage of watchlist labels.
Definition at line 18 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::__construct | ( | private IConnectionProvider | $dbProvider, |
| private LoggerInterface | $logger, | ||
| private Config | $config ) |
Definition at line 24 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::countAllForUser | ( | UserIdentity | $user | ) |
Get the current total count of a user's watchlist labels.
| UserIdentity | $user |
Definition at line 226 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::countItems | ( | array | $labelIds | ) |
Get counts of all items with the given labels.
| int[] | $labelIds |
Definition at line 201 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::delete | ( | UserIdentity | $user, |
| array | $ids ) |
Delete a set of watchlist labels, by ID.
| UserIdentity | $user | |
| int[] | $ids | watchlist_label IDs to delete. |
Definition at line 87 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::loadAllForUser | ( | UserIdentity | $user | ) |
Get all of a user's watchlist labels.
| UserIdentity | $user |
Definition at line 172 of file WatchlistLabelStore.php.
Referenced by MediaWiki\Specials\SpecialWatchlist\__construct().
| MediaWiki\Watchlist\WatchlistLabelStore::loadById | ( | UserIdentity | $user, |
| int | $id ) |
Load a single watchlist label by ID.
| UserIdentity | $user | |
| int | $id | The watchlist_label ID. |
Definition at line 129 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::loadByName | ( | UserIdentity | $user, |
| string | $name ) |
Load a single watchlist label by (normalized) name.
| UserIdentity | $user | |
| string | $name | The name to search for. |
Definition at line 150 of file WatchlistLabelStore.php.
| MediaWiki\Watchlist\WatchlistLabelStore::save | ( | WatchlistLabel | $label | ) |
Save a watchlist label to the database.
If this results in a new row, the label's ID will be set.
Definition at line 35 of file WatchlistLabelStore.php.
References MediaWiki\Watchlist\WatchlistLabel\getId(), and MediaWiki\Watchlist\WatchlistLabel\getName().
| const MediaWiki\Watchlist\WatchlistLabelStore::TABLE_WATCHLIST_LABEL = 'watchlist_label' |
Definition at line 20 of file WatchlistLabelStore.php.
| const MediaWiki\Watchlist\WatchlistLabelStore::TABLE_WATCHLIST_LABEL_MEMBER = 'watchlist_label_member' |
Definition at line 21 of file WatchlistLabelStore.php.