Open Journal Systems  3.3.0
NotificationManagerDelegate Class Reference
Inheritance diagram for NotificationManagerDelegate:
PKPNotificationOperationManager INotificationInfoProvider AnnouncementNotificationManager EditorAssignmentNotificationManager EditorDecisionNotificationManager EditorialReportNotificationManager PendingRevisionsNotificationManager PKPApproveSubmissionNotificationManager PKPEditingProductionStatusNotificationManager QueryNotificationManager SubmissionNotificationManager

Public Member Functions

 __construct ($notificationType)
 
 createNotification ($request, $userId=null, $notificationType, $contextId=null, $assocType=null, $assocId=null, $level=NOTIFICATION_LEVEL_NORMAL, $params=null, $suppressEmail=false, callable $mailConfigurator=null)
 
 getNotificationType ()
 
 updateNotification ($request, $userIds, $assocType, $assocId)
 
- Public Member Functions inherited from PKPNotificationOperationManager
 createTrivialNotification ($userId, $notificationType=NOTIFICATION_TYPE_SUCCESS, $params=null)
 
 deleteTrivialNotifications ($notifications)
 
 formatToGeneralNotification ($request, $notifications)
 
 formatToInPlaceNotification ($request, $notifications)
 
 getFormattedNotificationsForUser ($request, $userId, $level=NOTIFICATION_LEVEL_NORMAL, $contextId=null, $rangeInfo=null, $notificationTemplate='notification/notification.tpl')
 
 getIconClass ($notification)
 
 getNotificationContents ($request, $notification)
 
 getNotificationMessage ($request, $notification)
 
 getNotificationTitle ($notification)
 
 getNotificationUrl ($request, $notification)
 
 getParamsForCurrentLocale ($params)
 
 getStyleClass ($notification)
 
 isVisibleToAllUsers ($notificationType, $assocType, $assocId)
 

Protected Member Functions

 multipleTypesUpdate ()
 
- Protected Member Functions inherited from PKPNotificationOperationManager
 fetchLinkActionNotificationContent ($linkAction, $request)
 
 getMailTemplate ($emailKey=null)
 
 getUserBlockedEmailedNotifications ($userId, $contextId)
 
 getUserBlockedNotifications ($userId, $contextId)
 
 sendNotificationEmail ($request, $notification, ?int $contextId, callable $mailConfigurator=null)
 

Detailed Description

Abstract class to support notification manager delegates that provide default implementation to the interface that defines notification presentation data. It also introduce a method to be extended by subclasses to update notification objects.

Definition at line 21 of file NotificationManagerDelegate.inc.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ createNotification()

NotificationManagerDelegate::createNotification (   $request,
  $userId = null,
  $notificationType,
  $contextId = null,
  $assocType = null,
  $assocId = null,
  $level = NOTIFICATION_LEVEL_NORMAL,
  $params = null,
  $suppressEmail = false,
callable  $mailConfigurator = null 
)

Check if this manager delegate can handle the creation of the passed notification type. Create a new notification with the specified arguments and insert into DB

Parameters
$requestPKPRequest
$userIdint (optional)
$notificationTypeint
$contextIdint
$assocTypeint
$assocIdint
$levelint
$paramsarray
$suppressEmailboolean Whether or not to suppress the notification email.
$mailConfiguratorcallable Enables the customization of the Notification email
Returns
Notification object

Reimplemented from PKPNotificationOperationManager.

Definition at line 62 of file NotificationManagerDelegate.inc.php.

References getNotificationType(), and multipleTypesUpdate().

Referenced by PKPApproveSubmissionNotificationManager\updateNotification(), EditorAssignmentNotificationManager\updateNotification(), and EditorDecisionNotificationManager\updateNotification().

◆ getNotificationType()

◆ multipleTypesUpdate()

NotificationManagerDelegate::multipleTypesUpdate ( )
protected

Flag a notification manager that handles multiple notification types inside the update method within the same call. Only set this to true if you're sure the notification manager provides all information for all notification types you're handling (via the getNotification... methods).

Returns
boolean

Reimplemented in PKPApproveSubmissionNotificationManager.

Definition at line 75 of file NotificationManagerDelegate.inc.php.

Referenced by createNotification().

◆ updateNotification()

NotificationManagerDelegate::updateNotification (   $request,
  $userIds,
  $assocType,
  $assocId 
)

Define operations to update notifications.

Parameters
$requestPKPRequest Request object
$userIdsarray List of user IDs to notify
$assocTypeint ASSOC_TYPE_...
$assocIdint ID corresponding to $assocType
Returns
boolean True iff success

Reimplemented in PendingRevisionsNotificationManager, PKPEditingProductionStatusNotificationManager, EditorDecisionNotificationManager, EditorAssignmentNotificationManager, and PKPApproveSubmissionNotificationManager.

Definition at line 53 of file NotificationManagerDelegate.inc.php.


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