ModelBlogs module

Comment

A model in the Blogs module, with 15 members for templates, 10 API properties and 19 members for admin templates.

Blogs\Models\Frontend\Comment Blogs\Models\Api\Comment Blogs\Models\Backend\Comment Also in Blogs: Blog BlogArea Post PostArea PostRevision
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 15

Take no arguments.

# getId()
?int
# getText()
?string
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getPublished()
?DateTime
Get the date the record was published or is scheduled to be published.
# isPublished()
bool
Check if the record is published.
# getPerson()
?Person
# getParent()
?Comment
# getChildren()
Collection<omment>
# getPost()
?Post
# 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
# getAuthorName() Templates only
?string
Get the author name
# getAuthorEmail() Templates only
?string
Get the author email

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 10

Read-only values on the record.

# id
?int
# text
?string
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# published
?DateTime
Get the date the record was published or is scheduled to be published.
# published
bool
Check if the record is published.
# person
?Person
# parent
?Comment
# children
Collection<omment>
# post
?Post

Admin view

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

Properties 19

Take no arguments.

# getId()
?int
# getText()
?string
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getPublished()
?DateTime
Get the date the record was published or is scheduled to be published.
# isPublished()
bool
Check if the record is published.
# getPerson()
?Person
# getParent()
?Comment
# getChildren()
Collection<omment>
# getPost()
?Post
# 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
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# 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.
# getPublishUrl() Admin only
?string
Get the url for publishing the record.