ModelCustomEntities module

RelationshipDefinition

A model in the CustomEntities module, with 15 members for templates, 12 API properties and 17 members for admin templates.

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

# getAllowedEntity()
?Definition
Get the allowed target entity for this definition. If multiple entities are allowed, only returns the first entity.
# isMultiple()
bool
Checks whether the definition supports multiple records
# isRequired()
bool
Check whether providing a record is required for this definition
# getId()
?int
# getName()
?string
# getIdentifier()
?string
# getPosition()
?int
# getMinRecords()
?int
# getMaxRecords()
?int
# getDefinition()
?Definition
# getRelationships()
?Collection<Relationship>
# getAllowedEntities()
?Collection<Definition>
# 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.

# allowedEntity
?Definition
Get the allowed target entity for this definition. If multiple entities are allowed, only returns the first entity.
# multiple
bool
Checks whether the definition supports multiple records
# required
bool
Check whether providing a record is required for this definition
# id
?int
# name
?string
# identifier
?string
# position
?int
# minRecords
?int
# maxRecords
?int
# definition
?Definition
# relationships
?Collection<Relationship>
# allowedEntities
?Collection<Definition>

Admin view

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

Properties 17

Take no arguments.

# getAllowedEntity()
?Definition
Get the allowed target entity for this definition. If multiple entities are allowed, only returns the first entity.
# isMultiple()
bool
Checks whether the definition supports multiple records
# isRequired()
bool
Check whether providing a record is required for this definition
# getId()
?int
# getName()
?string
# getIdentifier()
?string
# getPosition()
?int
# getMinRecords()
?int
# getMaxRecords()
?int
# getDefinition()
?Definition
# getRelationships()
?Collection<Relationship>
# getAllowedEntities()
?Collection<Definition>
# 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
# getTreeSelectEntityNames() Admin only
array
Get the entity names to use for a tree select
# hasMultipleEntitiesAllowed() Admin only
bool
Check whether multiple entities are allowed as target for this relationship definition