|
MediaWiki master
|
Representation of a pair of user and title for watchlist entries. More...
Public Member Functions | |
| __construct (UserIdentity $user, PageReference $target, $notificationTimestamp, ?string $expiry=null) | |
| getExpiry (?int $style=TS_MW) | |
| When the watched item will expire. | |
| getExpiryInDays () | |
| Get days remaining until a watched item expires. | |
| getExpiryInDaysText (MessageLocalizer $msgLocalizer, $isDropdownOption=false) | |
| Get days remaining until a watched item expires as a text. | |
| getLinkTarget () | |
| getNotificationTimestamp () | |
| Get the notification timestamp of this entry. | |
| getTarget () | |
| getUserIdentity () | |
| isExpired () | |
| Has the watched item expired? | |
Static Public Member Functions | |
| static | calculateExpiryInDays (?string $expiry) |
| Get the number of days remaining until the given expiry time. | |
| static | newFromRecentChange (RecentChange $recentChange, UserIdentity $user) |
Representation of a pair of user and title for watchlist entries.
Definition at line 28 of file WatchedItem.php.
| MediaWiki\Watchlist\WatchedItem::__construct | ( | UserIdentity | $user, |
| PageReference | $target, | ||
| $notificationTimestamp, | |||
| ?string | $expiry = null ) |
| UserIdentity | $user | |
| PageReference | $target | |
| bool | null | string | $notificationTimestamp | the value of the wl_notificationtimestamp field |
| null | string | $expiry | Optional expiry timestamp in any format acceptable to wfTimestamp() |
Definition at line 65 of file WatchedItem.php.
|
static |
Get the number of days remaining until the given expiry time.
| string | null | $expiry | The expiry to calculate from, in any format supported by MWTimestamp::convert(). |
Definition at line 182 of file WatchedItem.php.
Referenced by MediaWiki\Actions\WatchAction\makeSuccessMessage().
| MediaWiki\Watchlist\WatchedItem::getExpiry | ( | ?int | $style = TS_MW | ) |
When the watched item will expire.
| int | null | $style | Given timestamp format to style the ConvertibleTimestamp |
Definition at line 140 of file WatchedItem.php.
Referenced by MediaWiki\Actions\WatchAction\getExpiryOptions(), and MediaWiki\Specials\SpecialWatchlist\outputChangesList().
| MediaWiki\Watchlist\WatchedItem::getExpiryInDays | ( | ) |
Get days remaining until a watched item expires.
Definition at line 168 of file WatchedItem.php.
| MediaWiki\Watchlist\WatchedItem::getExpiryInDaysText | ( | MessageLocalizer | $msgLocalizer, |
| $isDropdownOption = false ) |
Get days remaining until a watched item expires as a text.
| MessageLocalizer | $msgLocalizer | |
| bool | $isDropdownOption | Whether the text is being displayed as a dropdown option. The text is different as a dropdown option from when it is used in other places as a watchlist indicator. |
Definition at line 208 of file WatchedItem.php.
Referenced by MediaWiki\Actions\WatchAction\getExpiryOptions().
| MediaWiki\Watchlist\WatchedItem::getLinkTarget | ( | ) |
Definition at line 110 of file WatchedItem.php.
References MediaWiki\Watchlist\WatchedItem\getTarget(), and wfDeprecated().
| MediaWiki\Watchlist\WatchedItem::getNotificationTimestamp | ( | ) |
Get the notification timestamp of this entry.
Definition at line 128 of file WatchedItem.php.
| MediaWiki\Watchlist\WatchedItem::getTarget | ( | ) |
Definition at line 119 of file WatchedItem.php.
Referenced by MediaWiki\Watchlist\WatchedItem\getLinkTarget().
| MediaWiki\Watchlist\WatchedItem::getUserIdentity | ( | ) |
Definition at line 102 of file WatchedItem.php.
| MediaWiki\Watchlist\WatchedItem::isExpired | ( | ) |
|
static |
| RecentChange | $recentChange | |
| UserIdentity | $user |
Definition at line 90 of file WatchedItem.php.
References MediaWiki\RecentChanges\RecentChange\getTitle().