ModelCommon module

Currency

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

Take no arguments.

# getId()
?int
# getName()
?string
# getShortName()
?string
# getSymbol()
?string
# getSymbolLocation()
?string
# getDecimalPlaces()
?int
# isDefault()
bool
Returns if this is the default currency for the site.
# isSupported()
bool
Returns if this currency is in the site's supported set (the default is always considered supported).
# 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 8

Read-only values on the record.

# id
?int
# name
?string
# shortName
?string
# symbol
?string
# symbolLocation
?string
# decimalPlaces
?int
# default
bool
Returns if this is the default currency for the site.
# supported
bool
Returns if this currency is in the site's supported set (the default is always considered supported).

Admin view

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

Properties 11

Take no arguments.

# getId()
?int
# getName()
?string
# getShortName()
?string
# getSymbol()
?string
# getSymbolLocation()
?string
# getDecimalPlaces()
?int
# isDefault()
bool
Returns if this is the default currency for the site.
# isSupported()
bool
Returns if this currency is in the site's supported set (the default is always considered supported).
# 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