Craft Triggers (2.x)

Condition extends Model
in package
implements ConditionInterface

Interfaces, Classes, Traits and Enums

ConditionInterface

Table of Contents

EVENT_DEFINE_FOR_TRIGGERS  = 'event-define-for-triggers'
$active  : bool
$dateCreated  : DateTime
$dateUpdated  : DateTime
$group_id  : int
$handle  : string
$id  : int
$operator  : string
$order  : int
$trigger_id  : int
$uid  : string
$_forTriggers  : bool
$_trigger  : TriggerInterface
configTemplate()  : string
Get configuration template
defineRules()  : array<string|int, mixed>
forTriggers()  : array<string|int, mixed>|null
To which triggers this condition applies
getConfig()  : array<string|int, mixed>
Get project config
getTrigger()  : TriggerInterface|null
Trigger getter
hasConfig()  : bool
Does this condition have configuration
populateFromData()  : mixed
Populate condition from array of data
setData()  : mixed
Data setter
setTrigger()  : mixed
Trigger setter
baseAttributes()  : array<string|int, mixed>
Get all base attributes, all attributes not in this array will be considered data
defineForTriggers()  : array<string|int, mixed>|null
Triggers for which this condition applies. null means all

Constants

EVENT_DEFINE_FOR_TRIGGERS

public mixed EVENT_DEFINE_FOR_TRIGGERS = 'event-define-for-triggers'

Properties

$_forTriggers

protected bool $_forTriggers = false

Methods

configTemplate()

Get configuration template

public configTemplate() : string
Tags
inheritDoc
Return values
string

defineRules()

public defineRules() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

forTriggers()

To which triggers this condition applies

public forTriggers() : array<string|int, mixed>|null
Tags
inheritDoc
Return values
array<string|int, mixed>|null

getConfig()

Get project config

public getConfig() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

hasConfig()

Does this condition have configuration

public hasConfig() : bool
Tags
inheritDoc
Return values
bool

populateFromData()

Populate condition from array of data

public populateFromData(array<string|int, mixed> $data) : mixed
Parameters
$data : array<string|int, mixed>
Tags
inheritDoc
Return values
mixed

setData()

Data setter

public setData(mixed $data) : mixed
Parameters
$data : mixed
Tags
inheritDoc
Return values
mixed

baseAttributes()

Get all base attributes, all attributes not in this array will be considered data

protected baseAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

defineForTriggers()

Triggers for which this condition applies. null means all

protected defineForTriggers() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

Search results