ModelHooks module

EntityEvent

This class is used to store information about which entity changes trigger a hook

A model in the Hooks module, with 15 members for templates, 12 API properties and 16 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 15

Take no arguments.

# isTargetingDeletedRecord()
bool
Checks whether the entity event is targeting a deleted record
# getParentEntity()
?string
Get the parent entity for this entity event's entity
# isSupportingParentRecord()
bool
Determines whether a parent record can be specified for the entity event
# getId()
?int
# getEntity()
?string
# getRecordId()
?int
# getParentRecordId()
?int
# getMethod()
?string
# getProperties()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getHook()
?Hook
# 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.

# targetingDeletedRecord
bool
Checks whether the entity event is targeting a deleted record
# parentEntity
?string
Get the parent entity for this entity event's entity
# supportingParentRecord
bool
Determines whether a parent record can be specified for the entity event
# id
?int
# entity
?string
# recordId
?int
# parentRecordId
?int
# method
?string
# properties
?string
# created
?DateTime
Date the record was created.
# modified
?DateTime
Last modification date for the record.
# hook
?Hook

Admin view

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

Properties 16

Take no arguments.

# isTargetingDeletedRecord()
bool
Checks whether the entity event is targeting a deleted record
# getParentEntity()
?string
Get the parent entity for this entity event's entity
# isSupportingParentRecord()
bool
Determines whether a parent record can be specified for the entity event
# getId()
?int
# getEntity()
?string
# getRecordId()
?int
# getParentRecordId()
?int
# getMethod()
?string
# getProperties()
?string
# getCreated()
?DateTime
Date the record was created.
# getModified()
?DateTime
Last modification date for the record.
# getHook()
?Hook
# 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
# getAvailableMethods() Admin only
array
Get the methods available for this entity event