ModelSites module

Client

A model in the Sites module, with 6 members for templates, 3 API properties and 10 members for admin templates.

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

Take no arguments.

# getId()
?int
# getName()
?string
# getSites()
?Collection<Site>
# 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 3

Read-only values on the record.

# id
?int
# name
?string
# sites
?Collection<Site>

Admin view

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

Properties 10

Take no arguments.

# getId()
?int
# getName()
?string
# getSites()
?Collection<Site>
# 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
# getSitesCount() Admin only
int
Get the number of sites for this client.
# getCreateChildUrl() Admin only
?string
Get the url for creating a child record.
# getEditUrl() Admin only
?string
Get the url for editing the record.