MediaWiki master
MediaWiki\Notification\NotificationService Class Reference

Notify users about things occurring. More...

Public Member Functions

 __construct (LoggerInterface $logger, ObjectFactory $objectFactory, MiddlewareChain $middlewareChain, array $specs)
 
 notify (Notification $notification, RecipientSet $recipients)
 Notify users about an event occurring.
 
 notifySimple (MessageSpecifier $message, UserIdentity $recipient)
 Notify a user with a message.
 

Public Attributes

const RECENT_CHANGE_HANDLER_SPEC
 MediaWiki's notification handler for watchlist, talk page, and admin notification.
 

Detailed Description

Notify users about things occurring.

Since
1.44
Stability: unstable

Definition at line 18 of file NotificationService.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Notification\NotificationService::__construct ( LoggerInterface $logger,
ObjectFactory $objectFactory,
MiddlewareChain $middlewareChain,
array $specs )

Definition at line 40 of file NotificationService.php.

Member Function Documentation

◆ notify()

MediaWiki\Notification\NotificationService::notify ( Notification $notification,
RecipientSet $recipients )

Notify users about an event occurring.

This method allows providing custom notification data to be handled by extensions, and defining multiple recipients.

Definition at line 76 of file NotificationService.php.

◆ notifySimple()

MediaWiki\Notification\NotificationService::notifySimple ( MessageSpecifier $message,
UserIdentity $recipient )

Notify a user with a message.

Definition at line 106 of file NotificationService.php.

Member Data Documentation

◆ RECENT_CHANGE_HANDLER_SPEC

const MediaWiki\Notification\NotificationService::RECENT_CHANGE_HANDLER_SPEC
Initial value:
= [
'class' => RecentChangeNotificationHandler::class,
'services' => [
'UserFactory',
'TitleFactory',
],
'types' => [ 'mediawiki.recent_change' ]
]

MediaWiki's notification handler for watchlist, talk page, and admin notification.

Definition at line 23 of file NotificationService.php.


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