MediaWiki master
MediaWiki\RecentChanges\RecentChangeNotification Class Reference

Notification representing a Recent change. More...

Inherits MediaWiki\Notification\Types\WikiNotification.

Collaboration diagram for MediaWiki\RecentChanges\RecentChangeNotification:

Public Member Functions

 __construct (UserIdentity $editor, PageIdentity $title, RecentChange $recentChange, string $pageStatus, string $source)
 
 getPageStatus ()
 Retrieve page state, list provided by MediaWiki is [ 'deleted', 'created', 'moved', 'restored', 'changed' ] but additionally extensions can add their own states.
 
 getRecentChange ()
 
 getSource ()
 What is the notification source, is it a User Talk change, Watchlist notification or an admin notification ( Users loaded from UsersNotifiedOnAllChanges )
 
 isUserTalkNotification ()
 
 isWatchlistNotification ()
 
- Public Member Functions inherited from MediaWiki\Notification\Types\WikiNotification
 __construct (string $type, PageIdentity $title, UserIdentity $agent, array $custom=[])
 Sets the agent (UserIdentity) who triggered this notification.
 
 getAgent ()
 
Returns
UserIdentity The user responsible for triggering this notification.

 
 getTitle ()
 Get the PageIdentity of the related page.
 
 setAgent (UserIdentity $agent)
 
- Public Member Functions inherited from MediaWiki\Notification\Notification
 __construct (string $type, array $custom=[])
 Base for Notifications.
 
 getProperties ()
 Retrieve Notification properties.
 
 getType ()
 Get the Notification type.
 
 setProperty (string $key, $value)
 Sets a custom property to the notification.
 

Public Attributes

const ADMIN_NOTIFICATION = 'admin'
 
const TALK_NOTIFICATION = 'talk'
 
const TYPE = 'mediawiki.recent_change'
 
const WATCHLIST_NOTIFICATION = 'watchlist'
 

Additional Inherited Members

- Protected Attributes inherited from MediaWiki\Notification\Notification
string string $type
 

Detailed Description

Notification representing a Recent change.

Used as base to transport Watchlist, UserTalk and Administrator recent changes notifications

Stability: newable
Since
1.45

Definition at line 20 of file RecentChangeNotification.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\RecentChanges\RecentChangeNotification::__construct ( UserIdentity $editor,
PageIdentity $title,
RecentChange $recentChange,
string $pageStatus,
string $source )
Parameters
UserIdentity$editor
PageIdentity$title
RecentChange$recentChange
string$pageStatusthe Page status from RecentChange, this change is not persisted
string$sourceone of types talk, admin or watchlist

Definition at line 39 of file RecentChangeNotification.php.

References $source.

Member Function Documentation

◆ getPageStatus()

MediaWiki\RecentChanges\RecentChangeNotification::getPageStatus ( )

Retrieve page state, list provided by MediaWiki is [ 'deleted', 'created', 'moved', 'restored', 'changed' ] but additionally extensions can add their own states.

Definition at line 61 of file RecentChangeNotification.php.

◆ getRecentChange()

MediaWiki\RecentChanges\RecentChangeNotification::getRecentChange ( )

Definition at line 52 of file RecentChangeNotification.php.

◆ getSource()

MediaWiki\RecentChanges\RecentChangeNotification::getSource ( )

What is the notification source, is it a User Talk change, Watchlist notification or an admin notification ( Users loaded from UsersNotifiedOnAllChanges )

Returns
string

Definition at line 70 of file RecentChangeNotification.php.

◆ isUserTalkNotification()

MediaWiki\RecentChanges\RecentChangeNotification::isUserTalkNotification ( )

Definition at line 74 of file RecentChangeNotification.php.

◆ isWatchlistNotification()

MediaWiki\RecentChanges\RecentChangeNotification::isWatchlistNotification ( )

Definition at line 78 of file RecentChangeNotification.php.

Member Data Documentation

◆ ADMIN_NOTIFICATION

const MediaWiki\RecentChanges\RecentChangeNotification::ADMIN_NOTIFICATION = 'admin'

Definition at line 25 of file RecentChangeNotification.php.

◆ TALK_NOTIFICATION

const MediaWiki\RecentChanges\RecentChangeNotification::TALK_NOTIFICATION = 'talk'

Definition at line 24 of file RecentChangeNotification.php.

◆ TYPE

const MediaWiki\RecentChanges\RecentChangeNotification::TYPE = 'mediawiki.recent_change'

Definition at line 22 of file RecentChangeNotification.php.

◆ WATCHLIST_NOTIFICATION

const MediaWiki\RecentChanges\RecentChangeNotification::WATCHLIST_NOTIFICATION = 'watchlist'

Definition at line 26 of file RecentChangeNotification.php.


The documentation for this class was generated from the following file: