Метод |
Описание |
|
__construct ( ) |
Class constructor. Defines the related database table name. |
|
addUserAllowed ( integer $ConversationID, integer $CountRecipients ) : boolean |
Are we allowed to add more recipients? |
|
addUserToConversation ( integer $ConversationID, integer $UserID ) |
Add another user to the conversation. |
|
bookmark ( integer $ConversationID, integer $UserID ) : boolean |
Bookmark (or unbookmark) a conversation for a specific user id. |
|
clear ( integer $ConversationID, integer $ClearingUserID ) |
Clear a conversation for a specific user id. |
|
conversationQuery ( integer $ViewingUserID, $Join = '' ) |
Build generic part of conversation query. |
|
countUnread ( integer $UserID, boolean $Save = true ) : integer |
Count unread messages. |
|
counts ( $Column, $From = false, $To = false, $Max = false ) |
|
|
get ( $OrderFields = '', $OrderDirection = '', $Limit = false, $PageNumber = false ) |
|
|
get2 ( integer $UserID, integer $Offset, integer $Limit ) |
Get a list of conversations for a user's inbox. This is an optimized version of ConversationModel::get(). |
|
getCount ( $wheres = [] ) |
|
|
getCountInbox ( integer $ViewingUserID, array $Wheres = '' ) : integer |
Get number of conversations involving current user. |
|
getCountWhere ( array $Wheres = '' ) : integer |
Get number of conversations that meet criteria. |
|
getID ( integer $ConversationID, string $datasetType = false, array $options = [] ) : array | stdClass |
Get meta data of a single conversation. |
|
getInbox ( integer $ViewingUserID, integer | string $Limit = '', integer | string $Offset = '0' ) : Gdn_DataSet |
Get list of conversations. |
|
getRecipients ( integer $ConversationID, integer $Limit = 20 ) : Gdn_DataSet |
Get all users involved in conversation. |
|
inConversation ( integer $ConversationID, integer $UserID ) : integer | boolean |
Figure out whether or not a user is in a conversation. |
|
joinLastMessages ( &$Data ) |
|
|
joinParticipants ( &$Data, $Max = 5 ) |
|
|
markRead ( integer $ConversationID, integer $ReadingUserID ) |
Update a conversation as read for a specific user id. |
|
participantTitle ( array | object $Conversation, boolean $Html = true, integer $Max = 3 ) : string |
Gets a nice title to represent the participants in a conversation. |
|
save ( array $formPostValues, array $settings = [] ) : integer |
Save conversation from form submission. |
|
updateParticipantCount ( integer $ConversationID ) |
Update the count of participants. |
|
updateUserUnreadCount ( array $UserIDs, boolean $SkipSelf = false ) |
Update users' unread conversation counter. |
|