ModelCommon module

CollectionElement

A model in the Common module, with 14 members for templates, 11 API properties and 14 members for admin templates.

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 14

Take no arguments.

# isLocal()
bool
Checks whether the collection element is local. Also returns false for empty collection elements.
# isGlobal()
bool
Checks whether the collection element is global. Also returns false for empty collection elements.
# isEmpty()
bool
Checks if the collection element is empty
# isPublished()
bool
Checks whether the collection element is published
# getPublished()
bool
Checks whether the collection element is published
# getId()
?int
# getPosition()
?int
# getContent()
?Content
# getComponent()
?Component
Retrieve the component for the collection. In the frontend, this method also delivers global components.
# getGlobalComponent()
?GlobalComponent
# getContainer()
?Model
# 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 11

Read-only values on the record.

# local
bool
Checks whether the collection element is local. Also returns false for empty collection elements.
# global
bool
Checks whether the collection element is global. Also returns false for empty collection elements.
# empty
bool
Checks if the collection element is empty
# published
bool
Checks whether the collection element is published
# published
bool
Checks whether the collection element is published
# id
?int
# position
?int
# content
?Content
# component
?Component
# globalComponent
?GlobalComponent
# container
?Model

Admin view

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

Properties 14

Take no arguments.

# isLocal()
bool
Checks whether the collection element is local. Also returns false for empty collection elements.
# isGlobal()
bool
Checks whether the collection element is global. Also returns false for empty collection elements.
# isEmpty()
bool
Checks if the collection element is empty
# isPublished()
bool
Checks whether the collection element is published
# getPublished()
bool
Checks whether the collection element is published
# getId()
?int
# getPosition()
?int
# getContent()
?Content
# getComponent()
?Component
# getGlobalComponent()
?GlobalComponent
# getContainer()
?Model
# 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