/** * Return a CSS class containing the icon of this notification type * @param $notification Notification * @return string */ function getIconClass($notification) { switch ($notification->getType()) { case NOTIFICATION_TYPE_PUBLISHED_ISSUE: return 'notifyIconPublished'; case NOTIFICATION_TYPE_NEW_ANNOUNCEMENT: return 'notifyIconNewAnnouncement'; case NOTIFICATION_TYPE_BOOK_REQUESTED: case NOTIFICATION_TYPE_BOOK_CREATED: case NOTIFICATION_TYPE_BOOK_UPDATED: case NOTIFICATION_TYPE_BOOK_DELETED: case NOTIFICATION_TYPE_BOOK_MAILED: case NOTIFICATION_TYPE_BOOK_SETTINGS_SAVED: case NOTIFICATION_TYPE_BOOK_SUBMISSION_ASSIGNED: case NOTIFICATION_TYPE_BOOK_AUTHOR_ASSIGNED: case NOTIFICATION_TYPE_BOOK_AUTHOR_DENIED: case NOTIFICATION_TYPE_BOOK_AUTHOR_REMOVED: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_SUCCESS: return 'notifyIconSuccess'; case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_NO_GIFT_TO_REDEEM: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_ALREADY_REDEEMED: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_INVALID: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_TYPE_INVALID: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_NON_EXPIRING: return 'notifyIconError'; default: return parent::getIconClass($notification); } }
/** * Return a CSS class containing the icon of this notification type * @param $notification Notification * @return string */ function getIconClass(&$notification) { switch ($notification->getType()) { case NOTIFICATION_TYPE_ARTICLE_SUBMITTED: return 'notifyIconNewPage'; case NOTIFICATION_TYPE_SUPP_FILE_MODIFIED: return 'notifyIconPageAttachment'; case NOTIFICATION_TYPE_METADATA_MODIFIED: case NOTIFICATION_TYPE_GALLEY_MODIFIED: return 'notifyIconEdit'; case NOTIFICATION_TYPE_SUBMISSION_COMMENT: case NOTIFICATION_TYPE_LAYOUT_COMMENT: case NOTIFICATION_TYPE_COPYEDIT_COMMENT: case NOTIFICATION_TYPE_PROOFREAD_COMMENT: case NOTIFICATION_TYPE_REVIEWER_COMMENT: case NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT: case NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT: case NOTIFICATION_TYPE_USER_COMMENT: return 'notifyIconNewComment'; case NOTIFICATION_TYPE_PUBLISHED_ISSUE: return 'notifyIconPublished'; case NOTIFICATION_TYPE_NEW_ANNOUNCEMENT: return 'notifyIconNewAnnouncement'; case NOTIFICATION_TYPE_BOOK_REQUESTED: case NOTIFICATION_TYPE_BOOK_CREATED: case NOTIFICATION_TYPE_BOOK_UPDATED: case NOTIFICATION_TYPE_BOOK_DELETED: case NOTIFICATION_TYPE_BOOK_MAILED: case NOTIFICATION_TYPE_BOOK_SETTINGS_SAVED: case NOTIFICATION_TYPE_BOOK_SUBMISSION_ASSIGNED: case NOTIFICATION_TYPE_BOOK_AUTHOR_ASSIGNED: case NOTIFICATION_TYPE_BOOK_AUTHOR_DENIED: case NOTIFICATION_TYPE_BOOK_AUTHOR_REMOVED: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_SUCCESS: return 'notifyIconSuccess'; case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_NO_GIFT_TO_REDEEM: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_ALREADY_REDEEMED: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_GIFT_INVALID: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_TYPE_INVALID: case NOTIFICATION_TYPE_GIFT_REDEEM_STATUS_ERROR_SUBSCRIPTION_NON_EXPIRING: return 'notifyIconError'; default: return parent::getIconClass($notification); } }
/** * @copydoc PKPNotificationManager::getMgrDelegate() */ protected function getMgrDelegate($notificationType, $assocType, $assocId) { switch ($notificationType) { case NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_INTERNAL_REVIEW: assert($assocType == ASSOC_TYPE_SUBMISSION && is_numeric($assocId)); import('lib.pkp.classes.notification.managerDelegate.EditorAssignmentNotificationManager'); return new EditorAssignmentNotificationManager($notificationType); case NOTIFICATION_TYPE_EDITOR_DECISION_INTERNAL_REVIEW: assert($assocType == ASSOC_TYPE_SUBMISSION && is_numeric($assocId)); import('lib.pkp.classes.notification.managerDelegate.EditorDecisionNotificationManager'); return new EditorDecisionNotificationManager($notificationType); case NOTIFICATION_TYPE_PENDING_INTERNAL_REVISIONS: assert($assocType == ASSOC_TYPE_SUBMISSION && is_numeric($assocId)); import('lib.pkp.classes.notification.managerDelegate.PendingRevisionsNotificationManager'); return new PendingRevisionsNotificationManager($notificationType); case NOTIFICATION_TYPE_APPROVE_SUBMISSION: case NOTIFICATION_TYPE_FORMAT_NEEDS_APPROVED_SUBMISSION: case NOTIFICATION_TYPE_VISIT_CATALOG: assert($assocType == ASSOC_TYPE_SUBMISSION && is_numeric($assocId)); import('classes.notification.managerDelegate.ApproveSubmissionNotificationManager'); return new ApproveSubmissionNotificationManager($notificationType); } // Otherwise, fall back on parent class return parent::getMgrDelegate($notificationType, $assocType, $assocId); }
/** * @copydoc PKPNotificationManager::getMgrDelegate() */ protected function getMgrDelegate($notificationType, $assocType, $assocId) { switch ($notificationType) { case NOTIFICATION_TYPE_APPROVE_SUBMISSION: case NOTIFICATION_TYPE_VISIT_CATALOG: assert($assocType == ASSOC_TYPE_SUBMISSION && is_numeric($assocId)); import('classes.notification.managerDelegate.ApproveSubmissionNotificationManager'); return new ApproveSubmissionNotificationManager($notificationType); } // Otherwise, fall back on parent class return parent::getMgrDelegate($notificationType, $assocType, $assocId); }
/** * Constructor. */ function NotificationManager() { parent::PKPNotificationManager(); }
/** * Return a CSS class containing the icon of this notification type * @param $notification Notification * @return string */ function getIconClass(&$notification) { switch ($notification->getType()) { case NOTIFICATION_TYPE_PAPER_SUBMITTED: return 'notifyIconNewPage'; case NOTIFICATION_TYPE_SUPP_FILE_MODIFIED: return 'notifyIconPageAttachment'; case NOTIFICATION_TYPE_METADATA_MODIFIED: case NOTIFICATION_TYPE_GALLEY_MODIFIED: return 'notifyIconEdit'; case NOTIFICATION_TYPE_SUBMISSION_COMMENT: case NOTIFICATION_TYPE_REVIEWER_COMMENT: case NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT: case NOTIFICATION_TYPE_DIRECTOR_DECISION_COMMENT: case NOTIFICATION_TYPE_USER_COMMENT: return 'notifyIconNewComment'; case NOTIFICATION_TYPE_NEW_ANNOUNCEMENT: return 'notifyIconNewAnnouncement'; default: return parent::getIconClass($notification); } }