All Data Structures Functions Variables Pages
Static Public Member Functions | Data Fields | Static Protected Member Functions
TasksNotificationUtil Class Reference
Inheritance diagram for TasksNotificationUtil:
NotificationsUtil

Static Public Member Functions

static submitTaskNotificationMessage (Task $task, $action, User $relatedUser=null, Comment $comment=null)
 
static resolvePeopleToSendNotification (Task $task, $action, User $relatedUser=null)
 
static getEmailMessageContent (Task $task, $action, User $relatedUser=null)
 
static getEmailMessageContentSecondPart ($action, Comment $comment=null)
 
- Static Public Member Functions inherited from NotificationsUtil
static submit (NotificationMessage $message, NotificationRules $rules)
 
static getRecentAjaxContentByUser (User $user, $count)
 
static renderShortenedListViewContent (Notification $notification)
 
static renderListViewContent (Notification $notification)
 
static resolveNotificationSettingNameFromType ($type)
 

Data Fields

const TASK_NEW = 'TaskNew'
 
const TASK_STATUS_BECOMES_AWAITING_ACCEPTANCE = 'TaskStatusBecomesAwaitingAcceptance'
 
const TASK_STATUS_BECOMES_COMPLETED = 'TaskStatusBecomesCompleted'
 
const TASK_STATUS_BECOMES_REJECTED = 'TaskStatusBecomesAccepted'
 
const TASK_OWNER_CHANGE = 'TaskOwnerChange'
 
const TASK_COMMENT_CREATED_OR_UPDATED = 'TaskCommentCreatedOrUpdated'
 

Static Protected Member Functions

static processTaskNotification (NotificationMessage $message, TaskNotificationRules $rule, $action)
 
static getNotificationMessageByAction (Task $task, $action, User $relatedUser=null, Comment $comment=null)
 
static sendTaskEmail (Notification $notification, TaskNotificationRules $rule, $action)
 
static resolveNotificationRulesClassByAction ($action)
 
- Static Protected Member Functions inherited from NotificationsUtil
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 for working with tasks notification

Definition at line 40 of file TasksNotificationUtil.php.

Member Function Documentation

static submitTaskNotificationMessage ( Task  $task,
  $action,
User  $relatedUser = null,
Comment  $comment = null 
)
static

Submit task notification message

Parameters
Task$task
string$action
null | User$relatedUser,theuser associated with the task notification. In case of
null | Comment$commentowner change it would be previous owner, in case of comment, it would be the user making the comment

Definition at line 63 of file TasksNotificationUtil.php.

static processTaskNotification ( NotificationMessage  $message,
TaskNotificationRules  $rule,
  $action 
)
staticprotected

Process task notification

Parameters
NotificationMessage$message
TaskNotificationRules$rule
string$action

Definition at line 86 of file TasksNotificationUtil.php.

static getNotificationMessageByAction ( Task  $task,
  $action,
User  $relatedUser = null,
Comment  $comment = null 
)
staticprotected

Gets notification message by action

Parameters
Task$task
$action
User$relatedUser
Comment$comment
Returns
NotificationMessage

Definition at line 114 of file TasksNotificationUtil.php.

static resolvePeopleToSendNotification ( Task  $task,
  $action,
User  $relatedUser = null 
)
static

Gets notification subscribers

Parameters
Task$task
$action
User$relatedUser
Returns
array

Definition at line 147 of file TasksNotificationUtil.php.

static getEmailMessageContent ( Task  $task,
  $action,
User  $relatedUser = null 
)
static

Gets email message for the notification

Parameters
Task$task
$action
User$relatedUser
Returns
string

Definition at line 200 of file TasksNotificationUtil.php.

static getEmailMessageContentSecondPart (   $action,
Comment  $comment = null 
)
static
Parameters
$action
Comment$comment
Returns
string

Definition at line 244 of file TasksNotificationUtil.php.

static sendTaskEmail ( Notification  $notification,
TaskNotificationRules  $rule,
  $action 
)
staticprotected

Send task email

Parameters
Notification$notification
TaskNotificationRules$rule
string$action

Definition at line 259 of file TasksNotificationUtil.php.

static resolveNotificationRulesClassByAction (   $action)
staticprotected

Resolve the notification rules class name by action name

Returns
string

Definition at line 289 of file TasksNotificationUtil.php.


The documentation for this class was generated from the following file:
Generated on Fri May 29 2020 07:11:01