ModelHooks module

EntityBatchEvent

Batch event containing information about which entity and record triggered a Hook and thus created a Batch

A model in the Hooks module, with 16 members for templates, 13 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 16

Take no arguments.

# getType()
string
Get the type of the event causing the hook execution. Always returns 'entity' for entity events.
# getDataDisplay()
string
Get a string representation of this EntityBatchEvent's record
# getEntityName()
?string
# getMethod()
?string
# getRecordId()
?int
# getRecord()
?Model
# getPreEventData()
?array
Get the data stored before the event occurs with the specified properties
# getContext()
?array
Get how the event came about, such as the method, provider and surface of the sign-in for a User Login event
# getTypeDisplay()
string
Get a string representation of the batch event based on its type
# getId()
?int
# getCreated()
?DateTime
Date the record was created.
# getCreatedBy()
?User
Get the user that triggered the event
# getBatch()
?Batch
# 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 13

Read-only values on the record.

# type
string
Get the type of the event causing the hook execution. Always returns 'entity' for entity events.
# dataDisplay
string
Get a string representation of this EntityBatchEvent's record
# entityName
?string
# method
?string
# recordId
?int
# record
?Model
# preEventData
?array
Get the data stored before the event occurs with the specified properties
# context
?array
Get how the event came about, such as the method, provider and surface of the sign-in for a User Login event
# typeDisplay
string
Get a string representation of the batch event based on its type
# id
?int
# created
?DateTime
Date the record was created.
# createdBy
?User
Get the user that triggered the event
# batch
?Batch

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.

# getType()
string
Get the type of the event causing the hook execution. Always returns 'entity' for entity events.
# getDataDisplay()
string
Get a string representation of this EntityBatchEvent's record
# getEntityName()
?string
# getMethod()
?string
# getRecordId()
?int
# getRecord()
?Model
# getPreEventData()
?array
Get the data stored before the event occurs with the specified properties
# getContext()
?array
Get how the event came about, such as the method, provider and surface of the sign-in for a User Login event
# getTypeDisplay()
string
Get a string representation of the batch event based on its type
# getId()
?int
# getCreated()
?DateTime
Date the record was created.
# getCreatedBy()
?User
Get the user that triggered the event
# getBatch()
?Batch
# 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