Open Journal Systems  3.3.0
NotificationManagerDelegate.inc.php
1 <?php
2 
19 import('lib.pkp.classes.notification.PKPNotificationOperationManager');
20 
22 
24  private $_notificationType;
25 
30  function __construct($notificationType) {
31  $this->_notificationType = $notificationType;
32  }
33 
38  function getNotificationType() {
39  return $this->_notificationType;
40  }
41 
50  function updateNotification($request, $userIds, $assocType, $assocId) {
51  return false;
52  }
53 
59  function createNotification($request, $userId = null, $notificationType, $contextId = null, $assocType = null, $assocId = null, $level = NOTIFICATION_LEVEL_NORMAL, $params = null, $suppressEmail = false, callable $mailConfigurator = null) {
60  assert($notificationType == $this->getNotificationType() || $this->multipleTypesUpdate());
61  return parent::createNotification($request, $userId, $notificationType, $contextId, $assocType, $assocId, $level, $params, $suppressEmail, $mailConfigurator);
62  }
63 
72  protected function multipleTypesUpdate() {
73  return false;
74  }
75 }
76 
77 
PKPNotificationOperationManager
Base class for notification manager that implements basic notification operations and default notific...
Definition: PKPNotificationOperationManager.inc.php:23
NotificationManagerDelegate
Abstract class to support notification manager delegates that provide default implementation to the i...
Definition: NotificationManagerDelegate.inc.php:21
NotificationManagerDelegate\multipleTypesUpdate
multipleTypesUpdate()
Definition: NotificationManagerDelegate.inc.php:75
NotificationManagerDelegate\getNotificationType
getNotificationType()
Definition: NotificationManagerDelegate.inc.php:41
NotificationManagerDelegate\updateNotification
updateNotification($request, $userIds, $assocType, $assocId)
Definition: NotificationManagerDelegate.inc.php:53
NotificationManagerDelegate\__construct
__construct($notificationType)
Definition: NotificationManagerDelegate.inc.php:33
NotificationManagerDelegate\createNotification
createNotification($request, $userId=null, $notificationType, $contextId=null, $assocType=null, $assocId=null, $level=NOTIFICATION_LEVEL_NORMAL, $params=null, $suppressEmail=false, callable $mailConfigurator=null)
Definition: NotificationManagerDelegate.inc.php:62