ModelForms module

StaticRichtext

Entity for RichText elements.

A model in the Forms module, with 23 members for templates, 18 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 23

Take no arguments.

# __toString() Templates only
string
Get a string representation of the element => render the output html
# getType()
string
Returns the type of the current element.
# getChildren()
Collection
# getEntity()
?string
# getId()
?int
# getName()
?string
Gets element name. It could be used in html to identify input, e.g. '<input name="{getName()}" ...>'.
# getHelp()
?string
Gets help text for the element. It could be used as a tooltip or in HTML as a title attribute, e.g. '<input title="{getHelp()}" ...>'.
# getEditor()
?string
# getText()
?string
Text for the element that usually is used for element's label
# getDefaultValue()
?string
# getPlaceholder()
?string
# isRequired()
?bool
# getRegex()
?string
# getPosition()
?int
# getSettings()
?array
# getRevision()
?FormRevision
# getStep()
?Step
# getParent()
?ElementGroup
# getElementId()
?string
# 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
# getHtml() Templates only
string
Renders static element. Block tag: div.element-block.static-element-block Text: div.element-text

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 18

Read-only values on the record.

# type
string
Returns the type of the current element.
# children
Collection
# entity
?string
# id
?int
# name
?string
Gets element name. It could be used in html to identify input, e.g. '<input name="{getName()}" ...>'.
# help
?string
Gets help text for the element. It could be used as a tooltip or in HTML as a title attribute, e.g. '<input title="{getHelp()}" ...>'.
# editor
?string
# text
?string
Text for the element that usually is used for element's label
# defaultValue
?string
# placeholder
?string
# required
?bool
# regex
?string
# position
?int
# settings
?array
# revision
?FormRevision
# step
?Step
# parent
?ElementGroup
# elementId
?string

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.

# getType()
string
Returns the type of the current element.
# getChildren()
Collection
# getEntity()
?string
# getId()
?int
# getName()
?string
Gets element name. It could be used in html to identify input, e.g. '<input name="{getName()}" ...>'.
# getHelp()
?string
Gets help text for the element. It could be used as a tooltip or in HTML as a title attribute, e.g. '<input title="{getHelp()}" ...>'.
# getEditor()
?string
# getText()
?string
Text for the element that usually is used for element's label
# getDefaultValue()
?string
# getPlaceholder()
?string
# isRequired()
?bool
# getRegex()
?string
# getPosition()
?int
# getSettings()
?array
# getRevision()
?FormRevision
# getStep()
?Step
# getParent()
?ElementGroup
# getElementId()
?string
# 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