MediaWiki master
MediaWiki\Notification\Middleware\SuppressNotificationByTypeMiddleware Class Reference

An example Middleware that allows to remove notifications of specific types. More...

Inherits MediaWiki\Notification\Middleware\FilterMiddleware.

Collaboration diagram for MediaWiki\Notification\Middleware\SuppressNotificationByTypeMiddleware:

Public Member Functions

 __construct (string $notificationTypeToSuppress)
 Suppress sending specific notification.
 
- Public Member Functions inherited from MediaWiki\Notification\Middleware\FilterMiddleware
 handle (NotificationsBatch $batch, callable $next)
 

Protected Member Functions

 filter (NotificationEnvelope $envelope)
 Decide whether we want to remove notification from the list.
 

Detailed Description

An example Middleware that allows to remove notifications of specific types.

Since
1.45

Definition at line 12 of file SuppressNotificationByTypeMiddleware.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Notification\Middleware\SuppressNotificationByTypeMiddleware::__construct ( string $notificationTypeToSuppress)

Suppress sending specific notification.

Definition at line 19 of file SuppressNotificationByTypeMiddleware.php.

Member Function Documentation

◆ filter()

MediaWiki\Notification\Middleware\SuppressNotificationByTypeMiddleware::filter ( NotificationEnvelope $envelope)
protected

Decide whether we want to remove notification from the list.

Reimplemented from MediaWiki\Notification\Middleware\FilterMiddleware.

Definition at line 26 of file SuppressNotificationByTypeMiddleware.php.


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