Conversation
class Conversation extends UrlModel implements NamedModel
A discussion (group of messages)
Constants
TABLE |
The name of the database table used for queries |
Methods
Get the subject of the discussion
Get the creator of the discussion
Determine whether a player is the one who created the message conversation
{@inheritdoc}
Get the time when the conversation was most recently active
Update the conversation's last activity timestamp
Update the conversation's subject
Get the last message of the conversation
Find whether the last message in the conversation has been read by a player
Mark the last message in the conversation as having been read by a player
Mark the last message in the conversation as unread by the conversation's members
Get the name of the route that shows the object
Get the possible statuses representing an active model (visible to everyone)
Get the name of the entity
Get a list containing each member of the conversation
Get the members of one of the conversation's teams that don't belong in the conversation
Get a list containing the IDs of each member player of the conversation
Get a list containing the IDs of each member team of the conversation
Create a new message conversation *
Send a new message to the conversation's members
Find out which members of the conversation should receive an e-mail after a new message has been sent
Get a query builder for conversations
Details
at line line 62
string
getSubject()
Get the subject of the discussion
at line line 72
Player
getCreator()
Get the creator of the discussion
at line line 83
bool
isCreator(int $id)
Determine whether a player is the one who created the message conversation
at line line 91
isEditor($player)
{@inheritdoc}
at line line 101
TimeDate
getLastActivity()
Get the time when the conversation was most recently active
at line line 111
void
updateLastActivity()
Update the conversation's last activity timestamp
at line line 123
Conversation
setSubject(string $subject)
Update the conversation's subject
at line line 133
Message
getLastMessage()
Get the last message of the conversation
at line line 150
bool
isReadBy(int $playerId)
Find whether the last message in the conversation has been read by a player
at line line 164
void
markReadBy(int $playerId)
Mark the last message in the conversation as having been read by a player
at line line 178
void
markUnread(int $except)
Mark the last message in the conversation as unread by the conversation's members
at line line 189
static string
getRouteName(string $action = 'show')
Get the name of the route that shows the object
at line line 197
static string[]
getActiveStatuses()
Get the possible statuses representing an active model (visible to everyone)
at line line 205
string
getName()
Get the name of the entity
at line line 215
Model[]
getMembers(int|null $hide = null)
Get a list containing each member of the conversation
at line line 234
Player[]
getMissingTeamMembers(Team $team)
Get the members of one of the conversation's teams that don't belong in the conversation
at line line 256
int[]
getPlayerIds(int|null $hide = null, bool $distinct = false)
Get a list containing the IDs of each member player of the conversation
at line line 278
int[]
getTeamIds()
Get a list containing the IDs of each member team of the conversation
at line line 291
static Conversation
createConversation(string $subject, int $creatorId, array $members = array())
Create a new message conversation *
at line line 315
Message
sendMessage(Player $from, string $message, string $status = 'visible')
Send a new message to the conversation's members
at line line 332
bool
isMember(Player|Team $member, bool $distinct = false)
Checks if a player or team belongs in the conversation
at line line 358
void
addMember(Player|Team $member, bool $distinct = true)
Add a member to the discussion
at line line 398
bool
isTeamMember(Player $member)
Find out if a player belongs to any of the conversation's teams
This does not take into account whether the player is a distinct member of the conversation (i.e. they have been invited separately)
at line line 459
int[]
getWaitingForEmailIDs(int $except, bool $read = true)
Find out which members of the conversation should receive an e-mail after a new message has been sent
at line line 479
static ConversationQueryBuilder
getQueryBuilder()
Get a query builder for conversations