Comment Bean - Mura Docs v7.0

Comment Bean

The comment bean/object includes comment-specific data. In addition, there are some comment-specific helper methods included such as whether the comment is approved, deleted, etc.

Syntax

The following examples illustrate how to "get" and/or "set" various attributes of the comment bean/object. Use whichever syntax feels best to you.

Loading the Bean

Load a comment bean/object by any of the following attributes:

  • commentid
  • remoteid
<cfset commentBean = m.getBean('comment').loadBy(commentid='{UUID}')>

Once you have a variable to reference the desired bean/object, you can use the example Getters and Setters below.

Getters

commentBean.get('attributeName')
commentBean.get{AttributeName}()
commentBean.getValue('attributeName')

Setters

commentBean.set('attributeName', 'someValue')
commentBean.set{AttributeName}('someValue')
commentBean.setValue('attributeName', 'someValue')

Usage

Use the comment bean/object to access and/or manipulate a comment.

Attributes

The table below lists available attributes.

Attribute Description
commentid A unique identifier for the comment.
comments The text of the comments.
contentid ContentID that the comment is associated with.
email Email address of the commenter.
entered Date/time of the comment.
flagcount Number of times the comment has been flagged as spam.
ip Internet Protocol (IP) address of the commenter.
isapproved Whether the comment is approved.
isdeleted Whether the comment is deleted.
isnew Whether the comment is new.
isspam Whether the comment is marked as spam.
kids Number of child comments.
name Name of the commenter.
parentid If the comment is a child, the ContentID of the parent comment.
path A comma-delimited path of ContentIDs to identify the ancestry of the comment.
siteid SiteID the comment belongs to.
subscribe Whether the commenter subscribed to future comments.
url URL the commenter entered.
userid UserID of the user who entered the comment.