NotificationsUtil Class Reference

Inheritance diagram for NotificationsUtil:
CommentsNotificationUtil ProjectsNotificationUtil TasksNotificationUtil

Static Public Member Functions

static submit (NotificationMessage $message, NotificationRules $rules)
static getRecentAjaxContentByUser (User $user, $count)
static renderShortenedListViewContent (Notification $notification)
static renderListViewContent (Notification $notification)
static resolveNotificationSettingNameFromType ($type)

Static Protected Member Functions

static getEmailSubject (Notification $notification, NotificationRules $rules)
static processNotification (NotificationMessage $message, NotificationRules $rules)
static resolveShouldSendEmailIfCritical ()
static sendEmail (Notification $notification, $sendImmediately, NotificationRules $rules)
static resolveAndGetNotifications (NotificationMessage $message, NotificationRules $rules)
static resolveToSaveNotification ()
static makeEmailMessage ()
static makeSender ()
static makeRecipient (Notification $notification)
static makeEmailContent (Notification $notification)

Detailed Description

Helper class to work with notifications.

Definition at line 40 of file NotificationsUtil.php.


Member Function Documentation

static submit ( NotificationMessage message,
NotificationRules rules 
) [static]

Given a NotificationMessage and a NotificationRule submit and process a notification

Parameters:
NotificationMessage $message
NotificationRules $rules
Exceptions:
NotSupportedException 

Definition at line 48 of file NotificationsUtil.php.

static getRecentAjaxContentByUser ( User user,
count 
) [static]

Get the content for displaying recent notifications information via an ajax call.

See also:
HeaderLinksView->renderNotificationsLinkContent()
Parameters:
User $user

Definition at line 63 of file NotificationsUtil.php.

static renderShortenedListViewContent ( Notification notification  )  [static]
Parameters:
Notification $notification
Returns:
string

Definition at line 108 of file NotificationsUtil.php.

static renderListViewContent ( Notification notification  )  [static]
Parameters:
Notification $notification
Returns:
string

Definition at line 135 of file NotificationsUtil.php.

static resolveAndGetNotifications ( NotificationMessage message,
NotificationRules rules 
) [static, protected]

Resolve and get notifications

Parameters:
NotificationMessage $message
$rules 
Exceptions:
NotSupportedException 
Returns:
Notification

Reimplemented in CommentsNotificationUtil.

Definition at line 251 of file NotificationsUtil.php.

static resolveToSaveNotification (  )  [static, protected]

Resolve to save notification

Returns:
bool

Definition at line 283 of file NotificationsUtil.php.

static resolveNotificationSettingNameFromType ( type  )  [static]

Resolve notification setting name from its type

Parameters:
string $type
Returns:
string

Definition at line 293 of file NotificationsUtil.php.

static makeEmailMessage (  )  [static, protected]
Returns:
EmailMessage

Definition at line 302 of file NotificationsUtil.php.

static makeSender (  )  [static, protected]
Returns:
EmailMessageSender

Definition at line 312 of file NotificationsUtil.php.

static makeRecipient ( Notification notification  )  [static, protected]
Parameters:
Notification $notification
Returns:
EmailMessageRecipient

Definition at line 325 of file NotificationsUtil.php.

static makeEmailContent ( Notification notification  )  [static, protected]
Parameters:
Notification $notification
Returns:
EmailMessageContent

Definition at line 339 of file NotificationsUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Thu Nov 14 07:11:05 2019