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

CommentsUtil Class Reference

Static Public Member Functions

static sendNotificationOnCommentCreateOrUpdate (RedBeanModel $relatedModel, Comment $comment, $peopleToSendNotification)
static getUrlToEmail ($model)
static getMentionedUsersForNotification (Comment $comment)
static replaceMentionedUsernamesWithFullNamesAndLinksInComments ($commentDescription)
static resolveMarkdownTagsAndConvertToHtml ($description, $type)
static hasUserHaveAccessToEditOrDeleteComment (Comment $comment, User $user)

Static Protected Member Functions

static createNotificationMessage ($model, Comment $comment)
static resolveOnNewCommentNotificationSettingNameByModel (RedBeanModel $model)
static resolveNotificationRulesClassByModel (RedBeanModel $model)

Detailed Description

Helper class for working with comments

Definition at line 42 of file CommentsUtil.php.


Member Function Documentation

static sendNotificationOnCommentCreateOrUpdate ( RedBeanModel relatedModel,
Comment comment,
peopleToSendNotification 
) [static]
Parameters:
RedBeanModel $relatedModel
Comment $comment
array $peopleToSendNotification

Definition at line 49 of file CommentsUtil.php.

static getUrlToEmail ( model  )  [static]
Parameters:
$model 
Returns:
mixed

Definition at line 73 of file CommentsUtil.php.

static createNotificationMessage ( model,
Comment comment 
) [static, protected]

Creates notification message for new comment

Parameters:
$model 
Comment $comment
Returns:
NotificationMessage

Definition at line 95 of file CommentsUtil.php.

static getMentionedUsersForNotification ( Comment comment  )  [static]

Parse comments and extract all username between '[~' and ']' For example if we have string: "Hello [~john]"

Parameters:
Comment $comment
Returns:
array

Definition at line 137 of file CommentsUtil.php.

static replaceMentionedUsernamesWithFullNamesAndLinksInComments ( commentDescription  )  [static]

Parse comments and extract all username between '[~' and ']' For example if we have string: "Hello [~john]", after replacement, it will be: Hello John Smith

Parameters:
string $commentDescription
Returns:
array

Definition at line 170 of file CommentsUtil.php.

static resolveOnNewCommentNotificationSettingNameByModel ( RedBeanModel model  )  [static, protected]

Resolve the notification setting name by model

Returns:
string

Definition at line 216 of file CommentsUtil.php.

static resolveNotificationRulesClassByModel ( RedBeanModel model  )  [static, protected]

Resolve the notification rules class name by model

Returns:
string

Definition at line 225 of file CommentsUtil.php.

static hasUserHaveAccessToEditOrDeleteComment ( Comment comment,
User user 
) [static]

Check if user should have access to comment edit and delete comments Only user who created comment and super administrators should have access to these actions

Parameters:
Comment $comment
User $user
Returns:
bool
Exceptions:
NotFoundException 

Definition at line 238 of file CommentsUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Mar 19 07:10:49 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