ModelHooks module

ConditionIf

Condition Entity

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

Take no arguments.

# getParent()
?Condition
Get the condition container
# isFirstIf()
bool
Check whether the condition is an IF condition, i.e. is at position 1 in the condition block
# isElseIf()
bool
Check whether the condition is an ELSE IF condition, i.e. is at position >= 2 in the condition block
# getDisplayType()
string
# getChildren()
Collection<BaseAction>
# getConditionType()
string
Get the condition type
# getTemplateCode()
string
Get the template code for this condition
# getEntity()
?string
Get the entity for this condition
# getCriteria()
?string
Get the criteria to use for this entity condition
# getType()
string
Get the type of the action, which is the object name without namespace for the action
# 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
# 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

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 23

Read-only values on the record.

# parent
?Condition
Get the condition container
# firstIf
bool
Check whether the condition is an IF condition, i.e. is at position 1 in the condition block
# elseIf
bool
Check whether the condition is an ELSE IF condition, i.e. is at position >= 2 in the condition block
# displayType
string
# children
Collection<BaseAction>
# conditionType
string
Get the condition type
# templateCode
string
Get the template code for this condition
# entity
?string
Get the entity for this condition
# criteria
?string
Get the criteria to use for this entity condition
# type
string
Get the type of the action, which is the object name without namespace for the action
# 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
# 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.

# getParent()
?Condition
Get the condition container
# isFirstIf()
bool
Check whether the condition is an IF condition, i.e. is at position 1 in the condition block
# isElseIf()
bool
Check whether the condition is an ELSE IF condition, i.e. is at position >= 2 in the condition block
# getDisplayType()
string
# getChildren()
Collection<BaseAction>
# getConditionType()
string
Get the condition type
# getTemplateCode()
string
Get the template code for this condition
# getEntity()
?string
Get the entity for this condition
# getCriteria()
?string
Get the criteria to use for this entity condition
# getType()
string
Get the type of the action, which is the object name without namespace for the action
# getAvailablePreviousActions()
Collection
Get the available previous actions
# getId()
?int
# getName()
?string
Virtual getter for the name. Returns the parent condition name.
# getText()
?string
# getPosition()
?int
# getData()
?array
# getCreated()
?DateTime
# getModified()
?DateTime
# getHook()
?Hook
Get the Hook this Action is assigned to
# 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
# getAvailableConditionTypes() Admin only
array
Get the available condition types
# getAvailableEntities() Admin only
array
Get the available entities
# getEventEntities() Admin only
array
Get the available entities
# getDisplayIcon() Admin only
string
Get the display icon to use when rendering the action
# getAvailableTemplateVariables() Admin only
array
Get the available template variables for this condition
# 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.