ModelHooks module

UpdateRecordAction

UpdateRecordAction Entity

A model in the Hooks module, with 26 members for templates, 22 API properties and 36 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 25

Take no arguments.

# getUpdateData()
string
Get the data to use when updating the record
# getSource()
?string
Get the source for the update record action
# getSourceAction()
?BaseAction
Get the source action for the update record action
# getElementIndex()
?int
Get the element index if the update record action is using a source requiring an index
# getEntity()
?string
Get the entity to use when selecting a record directly by entity and id
# getRecordId()
?string
Get the record id to use when selecting a record directly by entity and id
# getType()
string
Get the type of the action, which is the object name without namespace for the action
# getDisplayType()
string
Get Nice Name for Action Class
# getAvailablePreviousActions()
Collection
Get the available previous actions
# getId()
?int
# getName()
?string
# getText()
?string
# getPosition()
?int
# getData()
?array
# getCreated()
?DateTime
# getModified()
?DateTime
# getHook()
?Hook
Get the Hook this Action is assigned to
# getParent()
?BaseAction
# getPublished()
?DateTime
# isPublished()
bool
# isContainedInLoop()
bool
Check whether the action is contained in a loop
# getContainingLoop()
?Loop
Get the loop this action is contained in
# 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

Methods 1

Take arguments. The API serialises only getters that need none.

# getSourceRecord(BatchAction $batchAction)
Model
Get the source record

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 22

Read-only values on the record.

# updateData
string
Get the data to use when updating the record
# source
?string
Get the source for the update record action
# sourceAction
?BaseAction
Get the source action for the update record action
# elementIndex
?int
Get the element index if the update record action is using a source requiring an index
# entity
?string
Get the entity to use when selecting a record directly by entity and id
# recordId
?string
Get the record id to use when selecting a record directly by entity and id
# type
string
Get the type of the action, which is the object name without namespace for the action
# displayType
string
Get Nice Name for Action Class
# availablePreviousActions
Collection
Get the available previous actions
# id
?int
# name
?string
# text
?string
# position
?int
# data
?array
# created
?DateTime
# modified
?DateTime
# hook
?Hook
Get the Hook this Action is assigned to
# parent
?BaseAction
# published
?DateTime
# published
bool
# containedInLoop
bool
Check whether the action is contained in a loop
# containingLoop
?Loop
Get the loop this action is contained in

Admin view

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

Properties 35

Take no arguments.

# getUpdateData()
string
Get the data to use when updating the record
# getSource()
?string
Get the source for the update record action
# getSourceAction()
?BaseAction
Get the source action for the update record action
# getElementIndex()
?int
Get the element index if the update record action is using a source requiring an index
# getEntity()
?string
Get the entity to use when selecting a record directly by entity and id
# getRecordId()
?string
Get the record id to use when selecting a record directly by entity and id
# getType()
string
Get the type of the action, which is the object name without namespace for the action
# getDisplayType()
string
Get Nice Name for Action Class
# getAvailablePreviousActions()
Collection
Get the available previous actions
# getId()
?int
# getName()
?string
# getText()
?string
# getPosition()
?int
# getData()
?array
# getCreated()
?DateTime
# getModified()
?DateTime
# getHook()
?Hook
Get the Hook this Action is assigned to
# getParent()
?BaseAction
# getPublished()
?DateTime
# isPublished()
bool
# isContainedInLoop()
bool
Check whether the action is contained in a loop
# getContainingLoop()
?Loop
Get the loop this action is contained in
# 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
# getDisplayIcon() Admin only
string
Get the display icon to use when rendering the action
# getRunDataVariables() Admin only
array
Get the run data variables provided by this action
# getEditUrl() Admin only
?string
Get the url for editing the record.
# getMoveUrl() Admin only
?string
Get the url for moving the record.
# getDeleteUrl() Admin only
?string
Get the url for deleting the record.
# getAvailableSources() Admin only
array
Get the sources available to be used in this action
# getAvailableSourceActions() Admin only
Collection
Get the source actions available to be used in this action
# getAvailableEntities() Admin only
array
Get the available entities for recordId mode
# getAvailableTemplateVariables() Admin only
array
Get the template variables available in this action

Methods 1

Take arguments. The API serialises only getters that need none.

# getSourceRecord(BatchAction $batchAction)
Model
Get the source record