Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

MissionsUtil Class Reference

Static Public Member Functions

static renderDescriptionAndLatestForDisplayView (Mission $mission)
static markUserHasReadLatest (Mission $mission, User $user)
static markUserHasUnreadLatest (Mission $mission, User $user)
static hasUserReadMissionLatest (Mission $mission, User $user)
static markAllUserHasReadLatestExceptOwnerAndTakenBy (Mission $mission)
static markAllUserHasUnreadLatest (Mission $mission)
static makeActiveActionElementType ($type)
static makeDataProviderByType (Mission $mission, $type, $pageSize)
static makeAndSubmitStatusChangeNotificationMessage (User $userToReceiveMessage, $missionId, $messageContent)
static makeAndSubmitNewCommentNotificationMessage (User $userToReceiveMessage)
static makeAndSubmitNewMissionNotificationMessage (Mission $mission)
static getEmailContent (Mission $mission, User $user)
static getEmailSubject (Mission $mission)
static resolvePeopleToSendNotificationToOnNewMission (Mission $mission)
static resolvePeopleToSendNotificationToOnNewComment (Mission $mission, User $user)

Detailed Description

Helper class for working with missions

Definition at line 40 of file MissionsUtil.php.


Member Function Documentation

static renderDescriptionAndLatestForDisplayView ( Mission mission  )  [static]

Renders string content for the mission description or the latest mission comment if it exists.

Parameters:
Mission $mission
Returns:
string

Definition at line 48 of file MissionsUtil.php.

static markUserHasReadLatest ( Mission mission,
User user 
) [static]
Parameters:
Mission $mission
User $user

Definition at line 62 of file MissionsUtil.php.

static markUserHasUnreadLatest ( Mission mission,
User user 
) [static]
Parameters:
Mission $mission
User $user

Definition at line 73 of file MissionsUtil.php.

static hasUserReadMissionLatest ( Mission mission,
User user 
) [static]
Parameters:
Mission $mission
User $user
Returns:
bool

Definition at line 85 of file MissionsUtil.php.

static markAllUserHasReadLatestExceptOwnerAndTakenBy ( Mission mission  )  [static]
Parameters:
Mission $mission

Definition at line 95 of file MissionsUtil.php.

static markAllUserHasUnreadLatest ( Mission mission  )  [static]
Parameters:
Mission $mission

Definition at line 111 of file MissionsUtil.php.

static makeActiveActionElementType ( type  )  [static]
Parameters:
int $type
Returns:
string
Exceptions:
NotSupportedException 

Definition at line 125 of file MissionsUtil.php.

static makeDataProviderByType ( Mission mission,
type,
pageSize 
) [static]
Parameters:
Mission $mission
int $type
int $pageSize
Returns:
RedBeanModelDataProvider'

Definition at line 156 of file MissionsUtil.php.

static makeAndSubmitStatusChangeNotificationMessage ( User userToReceiveMessage,
missionId,
messageContent 
) [static]

Create and submit a notification when a status changes.

Parameters:
User $userToReceiveMessage
integer $missionId
string $messageContent

Definition at line 186 of file MissionsUtil.php.

static makeAndSubmitNewCommentNotificationMessage ( User userToReceiveMessage  )  [static]

Create at most one notification for a user when there are new unread comments.

Parameters:
User $userToReceiveMessage
integer $missionId
string $messageContent

Definition at line 208 of file MissionsUtil.php.

static makeAndSubmitNewMissionNotificationMessage ( Mission mission  )  [static]
Parameters:
Mission $mission

Definition at line 222 of file MissionsUtil.php.

static getEmailContent ( Mission mission,
User user 
) [static]
Parameters:
Mission $mission
User $user
Returns:
EmailMessageContent

Definition at line 243 of file MissionsUtil.php.

static getEmailSubject ( Mission mission  )  [static]
Parameters:
Mission $mission
Returns:
string

Definition at line 273 of file MissionsUtil.php.

static resolvePeopleToSendNotificationToOnNewMission ( Mission mission  )  [static]
Parameters:
Mission $mission
Returns:
array

Definition at line 282 of file MissionsUtil.php.

static resolvePeopleToSendNotificationToOnNewComment ( Mission mission,
User user 
) [static]

Given a Mission and the User that created the new comment return the people on the mission to send new notification to

Parameters:
Mission $mission
User $user
Returns:
Array $peopleToSendNotification

Definition at line 304 of file MissionsUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Jan 23 07:10:26 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8