MediaWiki master
MediaWiki\Notification\Middleware\FilterMiddleware Class Reference

Middleware that allows to filter notifications. More...

Inherits MediaWiki\Notification\NotificationMiddlewareInterface.

Inherited by MediaWiki\Notification\Middleware\SuppressNotificationByTypeMiddleware.

Collaboration diagram for MediaWiki\Notification\Middleware\FilterMiddleware:

Public Member Functions

 handle (NotificationsBatch $batch, callable $next)
 

Protected Member Functions

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

Detailed Description

Middleware that allows to filter notifications.

Stability: stable
to extend
Since
1.45

Definition at line 15 of file FilterMiddleware.php.

Member Function Documentation

◆ filter()

MediaWiki\Notification\Middleware\FilterMiddleware::filter ( NotificationEnvelope $envelope)
abstractprotected

Decide whether we want to remove notification from the list.

Return FilterMiddlewareAction::KEEP to keep the envelope Return FilterMiddlewareAction::REMOVE to remove the envelope

Reimplemented in MediaWiki\Notification\Middleware\SuppressNotificationByTypeMiddleware.

Referenced by MediaWiki\Notification\Middleware\FilterMiddleware\handle().

◆ handle()

MediaWiki\Notification\Middleware\FilterMiddleware::handle ( NotificationsBatch $batch,
callable $next )
Parameters
NotificationsBatch$batch
callable():void$next

Implements MediaWiki\Notification\NotificationMiddlewareInterface.

Definition at line 29 of file FilterMiddleware.php.

References MediaWiki\Notification\Middleware\FilterMiddleware\filter().


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