ModelCommon module

CustomField

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

Take no arguments.

# getId()
?int
# getName()
?string
# getLabel()
?string
# getHelp()
?string
# getInfo()
?string
# getEntity()
?string
# getType()
?InputType
# isRequired()
bool
# getDefaultContent()
?Content
# getCreated()
?DateTime
# getModified()
?DateTime
# getValues()
?Collection<CustomFieldValue>
# 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 12

Read-only values on the record.

# id
?int
# name
?string
# label
?string
# help
?string
# info
?string
# entity
?string
# type
?InputType
# required
bool
# defaultContent
?Content
# created
?DateTime
# modified
?DateTime

Admin view

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

Properties 21

Take no arguments.

# getId()
?int
# getName()
?string
# getLabel()
?string
# getHelp()
?string
# getInfo()
?string
# getEntity()
?string
# getType()
?InputType
# isRequired()
bool
# getDefaultContent()
?Content
# getCreated()
?DateTime
# getModified()
?DateTime
# getValues()
?Collection<CustomFieldValue>
# 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
# getAvailableInputTypes() Admin only
Collection
Get the available input types
# getAvailableEntities() Admin only
array
Get the available entities for the custom field
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# getManageUrl() Admin only
?string
Get the url for managing records.