ModelHooks module

SourceHookBatchEvent

Event triggered when a different hooks triggers this hook through a trigger hook action

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

# getType()
string
Get the type of the event causing the hook execution. Always returns 'hook' for entity events.
# getDataDisplay()
string
Get a string representation the source hook and action for this batch event
# getSourceBatchAction()
BatchAction
Get the source batch action for this event
# getSourceBatch()
Batch
Get the source batch for this event
# getSourceHook()
Hook
Get the source hook for this event
# getSourceAction()
TriggerHookAction
Get the source action for this event
# getData()
?array
Get the data passed to this 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 12

Read-only values on the record.

# type
string
Get the type of the event causing the hook execution. Always returns 'hook' for entity events.
# dataDisplay
string
Get a string representation the source hook and action for this batch event
# sourceBatchAction
BatchAction
Get the source batch action for this event
# sourceBatch
Batch
Get the source batch for this event
# sourceHook
Hook
Get the source hook for this event
# sourceAction
TriggerHookAction
Get the source action for this event
# data
?array
Get the data passed to this 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 15

Take no arguments.

# getType()
string
Get the type of the event causing the hook execution. Always returns 'hook' for entity events.
# getDataDisplay()
string
Get a string representation the source hook and action for this batch event
# getSourceBatchAction()
BatchAction
Get the source batch action for this event
# getSourceBatch()
Batch
Get the source batch for this event
# getSourceHook()
Hook
Get the source hook for this event
# getSourceAction()
TriggerHookAction
Get the source action for this event
# getData()
?array
Get the data passed to this 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