ModelUsers module

Setting

A model in the Users module, with 14 members for templates, 10 API properties and 24 members for admin templates.

Users\Models\Frontend\Setting Users\Models\Api\Setting Users\Models\Backend\Setting Also in Users: ApiKey Author AuthorCustomFieldValue Group GroupPrivilege LoginToken Person PersonAddress PersonAddressType PersonCustomFieldValue PrivilegeTarget SettingValue User UserAcl UserCustomFieldValue UserPrivilege
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 13

Take no arguments.

# getEditor()
?string
# getId()
?int
# getModule()
?string
# getKey()
?string
# getType()
?string
# getValue()
?string
# getUser()
?User
# getValues()
?Collection<SettingValue>
# isRequired()
?bool
# getRegex()
?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

Methods 1

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

# getSettingValueWithKey(string $key)
?SettingValue
Check if the setting has a value with the specified key and return it

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 10

Read-only values on the record.

# editor
?string
# id
?int
# module
?string
# key
?string
# type
?string
# value
?string
# user
?User
# required
?bool
# regex
?string

Admin view

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

Properties 22

Take no arguments.

# getEditor()
?string
# getId()
?int
# getModule()
?string
# getKey()
?string
# getType()
?string
# getValue()
?string
# getUser()
?User
# getValues()
?Collection<SettingValue>
# isRequired()
?bool
# getRegex()
?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
# getDescription() Admin only
?string
# getHelp() Admin only
?string
# getPossibleValues() Admin only
?array
# getAvailableModels() Admin only
?Collection
# getDisplayProperty() Admin only
?string
# getDefaultValue() Admin only
?mixed
# isUserSettable() Admin only
bool
# getEntity() Admin only
?string
# getCleanRegex() Admin only
string
Gets HTML encoded regex. NOTE in JS and HTML we don't need delimiters (e.g., / or ~) at the start and end, nor trailing modifiers (e.g., i, m). This method detects and strips them if present, extracting the raw pattern.

Methods 2

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

# getSettingValueWithKey(string $key)
?SettingValue
Check if the setting has a value with the specified key and return it
# getDefaultValueAsString(string $separator) Admin only
?string
Get the default value as a string