ModelSites module

Hostname

A model in the Sites module, with 7 members for templates, 4 API properties and 11 members for admin templates.

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

Take no arguments.

# isPrimary()
bool
Check whether this hostname is the primary hostname in the environment
# getId()
?int
# getHostname()
?string
# getEnvironment()
?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 4

Read-only values on the record.

# primary
bool
Check whether this hostname is the primary hostname in the environment
# id
?int
# hostname
?string
# environment
?Environment

Admin view

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

Properties 11

Take no arguments.

# isPrimary()
bool
Check whether this hostname is the primary hostname in the environment
# getId()
?int
# getHostname()
?string
# getEnvironment()
?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
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.