ModelDocumentation module

Comment

A model in the Documentation module, with 21 members for templates, 18 API properties and 30 members for admin templates.

Documentation\Models\Frontend\Comment Documentation\Models\Api\Comment Documentation\Models\Backend\Comment Also in Documentation: GlobalComment GlobalCommentVote GlobalPage GlobalPageRevision Page PageRevision Vote
View
What Smarty and Twig templates receive. Properties in REST API responses and job payloads. What admin screen templates receive when you override them.

Templates view

Properties 21

Take no arguments.

# getRootComment()
Comment
Get the root comment
# getUpVotes()
int
Get the number of up votes for this comment
# getDownVotes()
int
Get the number of down votes for this comment
# isUpVotedByUser()
bool
Check if the comment has been up voted by the currently authenticated user
# isDownVotedByUser()
bool
Check if the comment has been down voted by the currently authenticated user
# getId()
?int
# getText()
?string
# isQuestion()
bool
# getAnswer()
?Comment
# getQuestionForAnswer()
?Comment
# isAnswered()
bool
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getParent()
?Comment
# getChildren()
?Collection<Comment>
# getPage()
?Page
# getCreatedBy()
?User
# getVotes()
?Collection<Vote>
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned

API & Jobs view

API & JobsEach property is a key in REST API responses and job payloads. Its name is the template getter without get, is or has. Methods that need arguments are not available here.

Properties 18

Read-only values on the record.

# rootComment
Comment
Get the root comment
# upVotes
int
Get the number of up votes for this comment
# downVotes
int
Get the number of down votes for this comment
# upVotedByUser
bool
Check if the comment has been up voted by the currently authenticated user
# downVotedByUser
bool
Check if the comment has been down voted by the currently authenticated user
# id
?int
# text
?string
# question
bool
# answer
?Comment
# questionForAnswer
?Comment
# answered
bool
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# parent
?Comment
# children
?Collection<Comment>
# page
?Page
# createdBy
?User
# votes
?Collection<Vote>

Admin view

AdminAvailable in cdna-admin templates. Copy an admin template into your site repository to change how this record is edited.

Properties 30

Take no arguments.

# getRootComment()
Comment
Get the root comment
# getUpVotes()
int
Get the number of up votes for this comment
# getDownVotes()
int
Get the number of down votes for this comment
# isUpVotedByUser()
bool
Check if the comment has been up voted by the currently authenticated user
# isDownVotedByUser()
bool
Check if the comment has been down voted by the currently authenticated user
# getId()
?int
# getText()
?string
# isQuestion()
bool
# getAnswer()
?Comment
# getQuestionForAnswer()
?Comment
# isAnswered()
bool
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getParent()
?Comment
# getChildren()
?Collection<Comment>
# getPage()
?Page
# getCreatedBy()
?User
# getVotes()
?Collection<Vote>
# isNewRecord() Not in API & Jobs
bool
Check if the record is a new record
# isHierarchicalModel() Not in API & Jobs
bool
Check whether a model is a hierarchical model, i.e. can have children
# isVersionedModel() Not in API & Jobs
bool
Check whether a model is versioned
# getAvailableUsers() Admin only
Collection
Get the available users for the comment
# getCreateChildUrl() Admin only
?string
Get the url for creating a child record.
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# getPublishUrl() Admin only
?string
Get the url for publishing the record.
# getManageUrl() Admin only
?string
Get the url for managing records.
# getPermissionsUrl() Admin only
?string
Get the url for editing the permissions of the record.
# getCheckPermissionsUrl() Admin only
?string
Get the url for checking user permissions for this record.