ModelCommon module

InputType

A model in the Common module, with 18 members for templates, 15 API properties and 30 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 18

Take no arguments.

# getEntity()
?string
Get the entity specified for this input type. Returns null if no entity was specified, or the input type does not have record or records as category.
# getEntityParentId()
?string
Gets ID of parent for the entity specified for this input type. Returns null if the input type does not have record or records as category or if no parent was specified.
# getId()
?int
# getName()
?string
# getCategory()
?string
# getEditor()
?string
# getRegex()
?string
# getMaxLength()
?int
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getDefaultContent()
?Content
# getPossibleValues()
?Collection<InputTypePossibleValue>
# getLayoutAreas()
?Collection<LayoutArea>
# getCustomFields()
?Collection<CustomField>
Returns custom fields (not their values) that use this input type.
# getParameters()
?array
# 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 15

Read-only values on the record.

# entity
?string
Get the entity specified for this input type. Returns null if no entity was specified, or the input type does not have record or records as category.
# entityParentId
?string
Gets ID of parent for the entity specified for this input type. Returns null if the input type does not have record or records as category or if no parent was specified.
# id
?int
# name
?string
# category
?string
# editor
?string
# regex
?string
# maxLength
?int
# created
?DateTime
Get the date the record was created.
# modified
?DateTime
Get the last modification date for the record.
# defaultContent
?Content
# layoutAreas
?Collection<LayoutArea>
# customFields
?Collection<CustomField>
Returns custom fields (not their values) that use this input type.
# parameters
?array

Admin view

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

Properties 29

Take no arguments.

# getDefaultValuesList() Admin only
array
Gets default content values array that is suitable to be used in <select> tag.
In this case every key equals to its value.
# getEntity()
?string
Get the entity specified for this input type. Returns null if no entity was specified, or the input type does not have record or records as category.
# getEntityParentId()
?string
Gets ID of parent for the entity specified for this input type. Returns null if the input type does not have record or records as category or if no parent was specified.
# getId()
?int
# getName()
?string
# getCategory()
?string
# getEditor()
?string
# getRegex()
?string
# getMaxLength()
?int
# getCreated()
?DateTime
Get the date the record was created.
# getModified()
?DateTime
Get the last modification date for the record.
# getDefaultContent()
?Content
# getPossibleValues()
?Collection<InputTypePossibleValue>
# getLayoutAreas()
?Collection<LayoutArea>
# getCustomFields()
?Collection<CustomField>
Returns custom fields (not their values) that use this input type.
# getParameters()
?array
# 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
# getAvailableCategories() Admin only
array
Get the available categories for input types
# getAvailableEditors() Admin only
array
Get the available editors for text inputs
# getAvailableModes() Admin only
array
Get the available code languages for the code editor
# getAvailableEntities() Admin only
array
Get the available entities for record input types
# getAvailableRecords() Admin only
Collection
Get the available records for a record input type
# getLayoutAreasCount() Admin only
int
Get the number of layouts for this input type.
# getCustomFieldsCount() Admin only
int
Get the number of layouts for this input type.
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getManageUrl() Admin only
?string
Get the url for managing records.

Methods 1

Take arguments. The API serialises only getters that need none.

# getAvailableRecordsNames(?int $siteId) Admin only
array
Get multidimensional array with id and text as columns for use in tree selects