All Data Structures Functions Variables Pages
Static Public Member Functions
ConversationsUtil Class Reference

Static Public Member Functions

static renderSubjectAndLatestForDisplayView (Conversation $conversation)
 
static getUnreadCountTabMenuContentForCurrentUser ()
 
static markUserHasReadLatest (Conversation $conversation, User $user, $hasReadLatest=true)
 
static hasUserReadConversationLatest (Conversation $conversation, User $user)
 
static resolvePeopleOnConversation (Conversation $conversation)
 
static resolvePeopleToSendNotificationToOnNewComment (Conversation $conversation, User $user)
 

Detailed Description

Helper class for working with conversations

Definition at line 40 of file ConversationsUtil.php.

Member Function Documentation

static renderSubjectAndLatestForDisplayView ( Conversation  $conversation)
static

Renders string content for the conversation subject and either the description or latest conversation comment if it exists.

Parameters
Conversation$conversation
Returns
string

Definition at line 48 of file ConversationsUtil.php.

static getUnreadCountTabMenuContentForCurrentUser ( )
static

For the current user, render a string of how many unread conversations exist for the user.

Returns
string

Definition at line 62 of file ConversationsUtil.php.

static markUserHasReadLatest ( Conversation  $conversation,
User  $user,
  $hasReadLatest = true 
)
static

Given a conversation and a user, mark that the user has read or not read the latest changes as a conversation participant, or if the user is the owner, than as the owner.

Parameters
Conversation$conversation
User$user
Boolean$hasReadLatest

Definition at line 74 of file ConversationsUtil.php.

static hasUserReadConversationLatest ( Conversation  $conversation,
User  $user 
)
static
Parameters
Conversation$conversation
User$user
Returns
A|bool

Definition at line 110 of file ConversationsUtil.php.

static resolvePeopleOnConversation ( Conversation  $conversation)
static
Parameters
Conversation$conversation
Returns
array

Definition at line 135 of file ConversationsUtil.php.

static resolvePeopleToSendNotificationToOnNewComment ( Conversation  $conversation,
User  $user 
)
static

Given a Conversation and the User that created the new comment return the people on the conversation to send new notification to

Parameters
Conversation$conversation
User$user
Returns
Array $peopleToSendNotification

Definition at line 149 of file ConversationsUtil.php.


The documentation for this class was generated from the following file:
Generated on Tue Apr 7 2020 07:10:54