ModelDocumentation module

GlobalComment

DocumentationPageComment

A model in the Documentation module, with 20 members for templates, 17 API properties and 29 members for admin templates.

Documentation\Models\Frontend\GlobalComment Documentation\Models\Api\GlobalComment Documentation\Models\Backend\GlobalComment Also in Documentation: Comment 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 20

Take no arguments.

# getRootComment()
GlobalComment
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
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getParent()
?GlobalComment
# getAnswer()
?GlobalComment
# getPage()
?GlobalPage
# getQuestionForAnswer()
?GlobalComment
# getCreatedBy()
?GlobalUser
# getVotes()
?Collection<lobalCommentVote>
# getChildren()
?Collection<lobalComment>
# 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 17

Read-only values on the record.

# rootComment
GlobalComment
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
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# parent
?GlobalComment
# answer
?GlobalComment
# page
?GlobalPage
# questionForAnswer
?GlobalComment
# createdBy
?GlobalUser
# votes
?Collection<lobalCommentVote>
# children
?Collection<lobalComment>

Admin view

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

Properties 29

Take no arguments.

# getRootComment()
GlobalComment
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
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getParent()
?GlobalComment
# getAnswer()
?GlobalComment
# getPage()
?GlobalPage
# getQuestionForAnswer()
?GlobalComment
# getCreatedBy()
?GlobalUser
# getVotes()
?Collection<lobalCommentVote>
# getChildren()
?Collection<lobalComment>
# 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.