Open Monograph Press  3.3.0
ApproveSubmissionNotificationManager.inc.php
1 <?php
2 
17 import('lib.pkp.classes.notification.managerDelegate.PKPApproveSubmissionNotificationManager');
18 
20 
25  function __construct($notificationType) {
26  parent::__construct($notificationType);
27  }
28 
32  public function getNotificationUrl($request, $notification) {
33  $router = $request->getRouter();
34  $dispatcher = $router->getDispatcher();
35  $contextDao = Application::getContextDAO();
36  $context = $contextDao->getById($notification->getContextId());
37 
38  switch ($notification->getType()) {
39  case NOTIFICATION_TYPE_VISIT_CATALOG:
40  return $dispatcher->url($request, ROUTE_PAGE, $context->getPath(), 'manageCatalog');
41  }
42 
43  return parent::getNotificationUrl($request, $notification);
44  }
45 
49  function getNotificationTitle($notification) {
50  switch ($notification->getType()) {
51  case NOTIFICATION_TYPE_APPROVE_SUBMISSION:
52  case NOTIFICATION_TYPE_FORMAT_NEEDS_APPROVED_SUBMISSION:
53  return __('notification.type.approveSubmissionTitle');
54  case NOTIFICATION_TYPE_VISIT_CATALOG:
55  return __('notification.type.visitCatalogTitle');
56  }
57  }
58 
62  public function getNotificationMessage($request, $notification) {
63  switch ($notification->getType()) {
64  case NOTIFICATION_TYPE_FORMAT_NEEDS_APPROVED_SUBMISSION:
65  return __('notification.type.formatNeedsApprovedSubmission');
66  case NOTIFICATION_TYPE_VISIT_CATALOG:
67  return __('notification.type.visitCatalog');
68  case NOTIFICATION_TYPE_APPROVE_SUBMISSION:
69  return __('notification.type.approveSubmission');
70  }
71 
72  return parent::getNotificationMessage($request, $notification);
73  }
74 }
75 
Application\getContextDAO
static getContextDAO()
Definition: Application.inc.php:145
ApproveSubmissionNotificationManager\getNotificationMessage
getNotificationMessage($request, $notification)
Definition: ApproveSubmissionNotificationManager.inc.php:62
PKPApproveSubmissionNotificationManager
Approve submission notification type manager delegate.
Definition: PKPApproveSubmissionNotificationManager.inc.php:18
ApproveSubmissionNotificationManager\__construct
__construct($notificationType)
Definition: ApproveSubmissionNotificationManager.inc.php:25
ApproveSubmissionNotificationManager\getNotificationTitle
getNotificationTitle($notification)
Definition: ApproveSubmissionNotificationManager.inc.php:49
ApproveSubmissionNotificationManager
Notification manager delegate that handles notifications related with submission approval process.
Definition: ApproveSubmissionNotificationManager.inc.php:19
ApproveSubmissionNotificationManager\getNotificationUrl
getNotificationUrl($request, $notification)
Definition: ApproveSubmissionNotificationManager.inc.php:32