ModelCustomEntities module

Definition

A model in the CustomEntities module, with 28 members for templates, 25 API properties and 38 members for admin templates.

CustomEntities\Models\Frontend\Definition CustomEntities\Models\Api\Definition CustomEntities\Models\Backend\Definition Also in CustomEntities: Record RecordArea RecordRevision Relationship RelationshipDefinition
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 28

Take no arguments.

# getPluralName()
string
Get the plural name for the custom entity
# getPluralIdentifier()
string
Get the plural identifier for the custom entity
# isRecordUrlAddressable()
bool
Check if an individual record can be accessed in the frontend
# isListingUrlAddressable()
bool
Check if a listing of records can be accessed in the frontend
# getListingUrl()
string
Get the url for listing the records. Returns an empty string if the custom entity is not UrlAddressable, or if no listing path is defined. Otherwise, just returns the path for listing records in the current site.
# getId()
?int
# getName()
?string
# getIcon()
?string
# getIdentifier()
?string
# getPath()
?string
# getRecordPath()
?string
# getTemplate()
?string
# isSited()
bool
# isUrlAddressable()
bool
# isSeoSettingsEnabled()
bool
# isPublishable()
bool
# isPositioned()
bool
# isCategorizable()
bool
# isTaggable()
bool
# getParent()
?Definition
# getChildren()
?Collection<Definition>
# getLayout()
?Layout
# getSeoSettings()
?SeoSettings
# getRecords()
?Collection<Record>
# getRelationshipDefinitions()
?Collection<RelationshipDefinition>
# 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 25

Read-only values on the record.

# pluralName
string
Get the plural name for the custom entity
# pluralIdentifier
string
Get the plural identifier for the custom entity
# recordUrlAddressable
bool
Check if an individual record can be accessed in the frontend
# listingUrlAddressable
bool
Check if a listing of records can be accessed in the frontend
# listingUrl
string
Get the url for listing the records. Returns an empty string if the custom entity is not UrlAddressable, or if no listing path is defined. Otherwise, just returns the path for listing records in the current site.
# id
?int
# name
?string
# icon
?string
# identifier
?string
# path
?string
# recordPath
?string
# template
?string
# sited
bool
# urlAddressable
bool
# seoSettingsEnabled
bool
# publishable
bool
# positioned
bool
# categorizable
bool
# taggable
bool
# parent
?Definition
# children
?Collection<Definition>
# layout
?Layout
# seoSettings
?SeoSettings
# records
?Collection<Record>
# relationshipDefinitions
?Collection<RelationshipDefinition>

Admin view

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

Properties 38

Take no arguments.

# getPluralName()
string
Get the plural name for the custom entity
# getPluralIdentifier()
string
Get the plural identifier for the custom entity
# isRecordUrlAddressable()
bool
Check if an individual record can be accessed in the frontend
# isListingUrlAddressable()
bool
Check if a listing of records can be accessed in the frontend
# getListingUrl()
string
Get the url for listing the records. Returns an empty string if the custom entity is not UrlAddressable, or if no listing path is defined. Otherwise, just returns the path for listing records in the current site.
# getId()
?int
# getName()
?string
# getIcon()
?string
# getIdentifier()
?string
# getPath()
?string
# getRecordPath()
?string
# getTemplate()
?string
# isSited()
bool
# isUrlAddressable()
bool
# isSeoSettingsEnabled()
bool
# isPublishable()
bool
# isPositioned()
bool
# isCategorizable()
bool
# isTaggable()
bool
# getParent()
?Definition
# getChildren()
?Collection<Definition>
# getLayout()
?Layout
# getSeoSettings()
?SeoSettings
# getRecords()
?Collection<Record>
# getRelationshipDefinitions()
?Collection<RelationshipDefinition>
# 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
# getRecordsCount() Admin only
int
Get the number of records this custom entity definition has
# getShowPath() Admin only
string
Get the path to show in tree tables
# getAvailableTemplates() Admin only
array
Get the available templates
# hasMenuElement() Admin only
bool
Check whether a menu element for this definition exists
# getSupportedChildDefinitionIds() Admin only
array
Get all child definition ids supported by this definition
# getCreateChildUrl() Admin only
?string
Get the url for creating a child record.
# 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.