Method |
Description |
|
__construct ( ) |
Class constructor. Defines the related database table name. |
|
cachePageWhere ( $Result, $PageWhere, $DiscussionID, $Page, null $Limit = null ) |
|
|
calculate ( $Comment ) |
Modifies comment data before it is returned. |
|
commentQuery ( boolean $FireEvent = true, $Join = true ) |
Select the data for a single comment. |
|
delete ( $where = [], $options = [] ) |
Delete a comment. |
|
deleteID ( integer $CommentID, array $Options = [] ) |
Delete a comment. |
|
get ( $OrderFields = '', $OrderDirection = 'asc', $Limit = false, $PageNumber = false ) |
|
|
getByDiscussion ( integer $DiscussionID, integer $Limit, integer $Offset ) : Gdn_DataSet |
Get comments for a discussion. |
|
getByUser ( integer $UserID, integer $Limit, integer $Offset ) : object |
Get comments for a user. |
|
getByUser2 ( integer $UserID, integer $Limit, integer $Offset, integer $LastCommentID = false ) : Gdn_DataSet |
Get comments for a user. This is an optimized version of CommentModel->GetByUser(). |
|
getCount ( $Wheres = '' ) |
|
|
getCountByDiscussion ( integer $DiscussionID ) : object |
Count total comments in a discussion specified by ID. |
|
getCountWhere ( array $Where = false ) : object |
Count total comments in a discussion specified by $Where conditions. |
|
getID ( integer $CommentID, string $ResultType = DATASET_TYPE_OBJECT, array $Options = [] ) : mixed |
Get single comment by ID. Allows you to pick data format of return value. |
|
getIDData ( integer $CommentID, $Options = [] ) : object |
Get single comment by ID as SQL result data. |
|
getNew ( integer $DiscussionID, integer $LastCommentID ) : object |
Get comments in a discussion since the specified one. |
|
getOffset ( mixed $Comment ) : object |
Gets the offset of the specified comment in its related discussion. |
|
getUnreadOffset ( $DiscussionID, $UserID = null ) |
|
|
getUserScore ( integer $CommentID, integer $UserID ) : integer |
Gets the UserComment Score value for the specified user. |
|
orderBy ( $Value = null ) : array |
Set the order of the comments or return current order. |
|
pageWhere ( $DiscussionID, $Page, $Limit ) |
|
|
recordAdvancedNotications ( ActivityModel $ActivityModel, array $Activity, array $Discussion ) |
Record advanced notifications for users. |
|
removePageCache ( $DiscussionID, $From = 1 ) |
|
|
save ( array $FormPostValues, array $Settings = false ) : integer |
Insert or update core data about the comment. |
|
save2 ( array $CommentID, integer $Insert, boolean $CheckExisting = true, boolean $IncUser = false ) |
Insert or update meta data about the comment. |
|
setCalculatedFields ( object &$Data ) |
Modifies comment data before it is returned. |
|
setUserScore ( integer $CommentID, integer $UserID, integer $Score ) : integer |
Sets the UserComment Score value. |
|
setWatch ( object $Discussion, integer $Limit, integer $Offset, integer $TotalComments ) |
Record the user's watch data. |
|
updateCommentCount ( $Discussion, array $Options = [] ) |
Updates the CountComments value on the discussion based on the CommentID being saved. |
|
updateUser ( integer $UserID, $Inc = false ) |
Update user's total comment count. |
|
updateUserCommentCounts ( integer $DiscussionID ) |
Update UserDiscussion so users don't have incorrect counts. |
|
where ( $Value = null ) |
|
|