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)

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)

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, the user associated with the task notification. In case of
null|Comment $comment owner 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 
) [static, protected]

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 
) [static, protected]

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 
) [static, protected]

Send task email

Parameters:
Notification $notification
TaskNotificationRules $rule
string $action

Definition at line 259 of file TasksNotificationUtil.php.

static resolveNotificationRulesClassByAction ( action  )  [static, protected]

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:
 All Data Structures Functions Variables
Generated on Mon Jul 22 07:11:08 2019