public getFormattedNotificationsForUser ( $request, $userId, $level = NOTIFICATION_LEVEL_NORMAL, $contextId = null, $rangeInfo = null, $notificationTemplate = 'notification/notification.tpl' ) : object | ||
$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 | |
return | object | DAOResultFactory containing matching Notification objects |
public function getFormattedNotificationsForUser($request, $userId, $level = NOTIFICATION_LEVEL_NORMAL, $contextId = null, $rangeInfo = null, $notificationTemplate = 'notification/notification.tpl')
{
$notificationDao = DAORegistry::getDAO('NotificationDAO');
$notifications = $notificationDao->getByUserId($userId, $level, null, $contextId, $rangeInfo);
return $this->formatNotifications($request, $notifications, $notificationTemplate);
}