ModelSites module

Site

A model in the Sites module, with 12 members for templates, 9 API properties and 19 members for admin templates.

Sites\Models\Frontend\Site Sites\Models\Api\Site Sites\Models\Backend\Site Also in Sites: CacheEntry CacheList CacheRecord Client Environment Hostname Request SiteData VcsConfig VcsLog
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 12

Take no arguments.

# getId()
?int
# getName()
?string
# getPrimaryEnvironment()
?Environment
# 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.
# getClient()
?Client
# getEnvironments()
?Collection<Environment>
# 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 9

Read-only values on the record.

# id
?int
# name
?string
# primaryEnvironment
?Environment
# 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.
# client
?Client
# environments
?Collection<Environment>

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
# getName()
?string
# getPrimaryEnvironment()
?Environment
# 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.
# getClient()
?Client
# getEnvironments()
?Collection<Environment>
# 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
# getAvailableEnvironments() Admin only
Collection
Get the available environments
# getEnvironmentsCount() Admin only
int
Get the number of environments for this site.
# 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.