|
Open Journal Systems
3.3.0
|
Public Member Functions | |
| createNotification ($request, $userId=null, $notificationType, $contextId=null, $assocType=null, $assocId=null, $level=NOTIFICATION_LEVEL_NORMAL, $params=null, $suppressEmail=false, callable $mailConfigurator=null) | |
| 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 | |
| fetchLinkActionNotificationContent ($linkAction, $request) | |
| getMailTemplate ($emailKey=null) | |
| getUserBlockedEmailedNotifications ($userId, $contextId) | |
| getUserBlockedNotifications ($userId, $contextId) | |
| sendNotificationEmail ($request, $notification, ?int $contextId, callable $mailConfigurator=null) | |
Base class for notification manager that implements basic notification operations and default notifications info. Subclasses can implement specific information.
Definition at line 23 of file PKPNotificationOperationManager.inc.php.
| PKPNotificationOperationManager::createNotification | ( | $request, | |
$userId = null, |
|||
| $notificationType, | |||
$contextId = null, |
|||
$assocType = null, |
|||
$assocId = null, |
|||
$level = NOTIFICATION_LEVEL_NORMAL, |
|||
$params = null, |
|||
$suppressEmail = false, |
|||
| callable | $mailConfigurator = null |
||
| ) |
Create a new notification with the specified arguments and insert into DB
| $request | PKPRequest |
| $userId | int (optional) |
| $notificationType | int |
| $contextId | int |
| $assocType | int |
| $assocId | int |
| $level | int |
| $params | array |
| $suppressEmail | boolean Whether or not to suppress the notification email. |
| $mailConfigurator | callable Enables the customization of the Notification email |
Reimplemented in NotificationManagerDelegate.
Definition at line 150 of file PKPNotificationOperationManager.inc.php.
References DAORegistry\getDAO(), getUserBlockedEmailedNotifications(), getUserBlockedNotifications(), and sendNotificationEmail().
| PKPNotificationOperationManager::createTrivialNotification | ( | $userId, | |
$notificationType = NOTIFICATION_TYPE_SUCCESS, |
|||
$params = null |
|||
| ) |
Create a new notification with the specified arguments and insert into DB This is a static method
| $userId | int |
| $notificationType | int |
| $params | array |
Definition at line 193 of file PKPNotificationOperationManager.inc.php.
References DAORegistry\getDAO().
Referenced by PKPManageFileApiHandler\deleteFile(), InformationCenterHandler\deleteNote(), PKPToolsHandler\resetPermissions(), SubmissionInformationCenterHandler\saveNote(), FileInformationCenterHandler\saveNote(), and ManageReviewFilesGridHandler\updateReviewFiles().
| PKPNotificationOperationManager::deleteTrivialNotifications | ( | $notifications | ) |
Deletes trivial notifications from database.
| array | $notifications |
Definition at line 217 of file PKPNotificationOperationManager.inc.php.
References DAORegistry\getDAO().
|
protected |
Get a notification content with a link action.
| $linkAction | LinkAction |
| $request | Request |
Definition at line 304 of file PKPNotificationOperationManager.inc.php.
References PKPTemplateManager\getManager().
Referenced by PendingRevisionsNotificationManager\getNotificationContents().
| PKPNotificationOperationManager::formatToGeneralNotification | ( | $request, | |
| $notifications | |||
| ) |
General notification data formating.
| $request | PKPRequest | |
| array | $notifications |
Definition at line 233 of file PKPNotificationOperationManager.inc.php.
References getIconClass(), getNotificationContents(), getNotificationTitle(), and getStyleClass().
| PKPNotificationOperationManager::formatToInPlaceNotification | ( | $request, | |
| $notifications | |||
| ) |
In place notification data formating.
| $request | PKPRequest |
| $notifications | array |
Definition at line 254 of file PKPNotificationOperationManager.inc.php.
References PKPTemplateManager\getManager().
| PKPNotificationOperationManager::getFormattedNotificationsForUser | ( | $request, | |
| $userId, | |||
$level = NOTIFICATION_LEVEL_NORMAL, |
|||
$contextId = null, |
|||
$rangeInfo = null, |
|||
$notificationTemplate = 'notification/notification.tpl' |
|||
| ) |
Construct a set of notifications and return them as a formatted string
| $request | PKPRequest |
| $userId | int |
| $level | int optional |
| $contextId | int optional |
| $rangeInfo | object optional |
| $notificationTemplate | string optional Template to use for constructing an individual notification for display |
Definition at line 92 of file PKPNotificationOperationManager.inc.php.
References DAORegistry\getDAO().
| PKPNotificationOperationManager::getIconClass | ( | $notification | ) |
Get the notification icon class.
| $notification | Notification |
Reimplemented from INotificationInfoProvider.
Reimplemented in PKPNotificationManager, EditorialReportNotificationManager, NotificationManager, SubmissionNotificationManager, and AnnouncementNotificationManager.
Definition at line 67 of file PKPNotificationOperationManager.inc.php.
Referenced by formatToGeneralNotification().
|
protected |
Get a template mail instance.
| $emailKey | string |
Reimplemented in EditorialReportNotificationManager, and AnnouncementNotificationManager.
Definition at line 293 of file PKPNotificationOperationManager.inc.php.
Referenced by sendNotificationEmail().
| PKPNotificationOperationManager::getNotificationContents | ( | $request, | |
| $notification | |||
| ) |
Provide the notification message as default content. Get the notification contents. Content is anything that's more than text, like presenting link actions inside fetched template files.
| $request | PKPRequest |
| $notification | Notification |
Reimplemented from INotificationInfoProvider.
Reimplemented in EditorialReportNotificationManager, PKPNotificationManager, QueryNotificationManager, PendingRevisionsNotificationManager, and AnnouncementNotificationManager.
Definition at line 46 of file PKPNotificationOperationManager.inc.php.
References getNotificationMessage().
Referenced by formatToGeneralNotification(), and sendNotificationEmail().
| PKPNotificationOperationManager::getNotificationMessage | ( | $request, | |
| $notification | |||
| ) |
Get the notification message. Only return translated locale key strings.
| $request | PKPRequest |
| $notification | Notification |
Reimplemented from INotificationInfoProvider.
Reimplemented in EditorialReportNotificationManager, PKPNotificationManager, NotificationManager, PendingRevisionsNotificationManager, QueryNotificationManager, ApproveSubmissionNotificationManager, AnnouncementNotificationManager, EditorAssignmentNotificationManager, EditorDecisionNotificationManager, PKPEditingProductionStatusNotificationManager, and SubmissionNotificationManager.
Definition at line 38 of file PKPNotificationOperationManager.inc.php.
Referenced by getNotificationContents().
| PKPNotificationOperationManager::getNotificationTitle | ( | $notification | ) |
Get the notification title.
| $notification | Notification |
Reimplemented from INotificationInfoProvider.
Reimplemented in PKPNotificationManager, PendingRevisionsNotificationManager, EditorDecisionNotificationManager, ApproveSubmissionNotificationManager, and QueryNotificationManager.
Definition at line 53 of file PKPNotificationOperationManager.inc.php.
Referenced by formatToGeneralNotification().
| PKPNotificationOperationManager::getNotificationUrl | ( | $request, | |
| $notification | |||
| ) |
Get a URL for the notification.
| $request | PKPRequest |
| $notification | Notification |
Reimplemented from INotificationInfoProvider.
Reimplemented in EditorialReportNotificationManager, EditorDecisionNotificationManager, QueryNotificationManager, SubmissionNotificationManager, AnnouncementNotificationManager, PKPEditingProductionStatusNotificationManager, PendingRevisionsNotificationManager, NotificationManager, PKPApproveSubmissionNotificationManager, and PKPNotificationManager.
Definition at line 31 of file PKPNotificationOperationManager.inc.php.
Referenced by sendNotificationEmail().
| PKPNotificationOperationManager::getParamsForCurrentLocale | ( | $params | ) |
Iterate through the localized params for a notification's locale key. For each parameter, return (in preferred order) a value for the user's current locale, a param for the journal's default locale, or the first value (in case the value is not localized)
| $params | array |
Definition at line 107 of file PKPNotificationOperationManager.inc.php.
References AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and AppLocale\getSupportedLocales().
| PKPNotificationOperationManager::getStyleClass | ( | $notification | ) |
Get the notification style class.
| $notification | Notification |
Reimplemented from INotificationInfoProvider.
Reimplemented in PKPNotificationManager, EditorialReportNotificationManager, QueryNotificationManager, NotificationManager, SubmissionNotificationManager, AnnouncementNotificationManager, PKPEditingProductionStatusNotificationManager, EditorDecisionNotificationManager, EditorAssignmentNotificationManager, PKPApproveSubmissionNotificationManager, and PendingRevisionsNotificationManager.
Definition at line 60 of file PKPNotificationOperationManager.inc.php.
Referenced by formatToGeneralNotification().
|
protected |
Get set of notification types user will also be notified by email.
Definition at line 282 of file PKPNotificationOperationManager.inc.php.
References DAORegistry\getDAO().
Referenced by createNotification().
|
protected |
Get set of notifications types user does not want to be notified of.
| $userId | int The notification user |
| $contextId | int |
Definition at line 273 of file PKPNotificationOperationManager.inc.php.
References DAORegistry\getDAO().
Referenced by createNotification().
| PKPNotificationOperationManager::isVisibleToAllUsers | ( | $notificationType, | |
| $assocType, | |||
| $assocId | |||
| ) |
Whether any notification with the passed notification type is visible to all users or not.
| $notificationType | int |
| $assocType | int ASSOC_TYPE_... |
| $assocId | int |
Reimplemented from INotificationInfoProvider.
Reimplemented in PKPNotificationManager, EditorAssignmentNotificationManager, and PKPApproveSubmissionNotificationManager.
Definition at line 74 of file PKPNotificationOperationManager.inc.php.
|
protected |
Send an email to a user regarding the notification
| $request | PKPRequest |
| $notification | object Notification |
| $contextId | ?int Context ID |
| $mailConfigurator | callable If specified, must return a MailTemplate instance. A ready MailTemplate object will be provided as argument |
Definition at line 374 of file PKPNotificationOperationManager.inc.php.
References Application\getContextDAO(), DAORegistry\getDAO(), getMailTemplate(), getNotificationContents(), getNotificationUrl(), and AppLocale\requireComponents().
Referenced by createNotification().