Craft Triggers (1.x)

Draft extends Condition
in package

Table of Contents

EVENT_DEFINE_FOR_TRIGGERS  = 'event-define-for-triggers'
$active  : bool
$dateCreated  : DateTime
$dateUpdated  : DateTime
$group_id  : int
$handle  : string
$id  : int
$isDraft  : bool
$operator  : string
$order  : int
$trigger_id  : int
$uid  : string
$_forTriggers  : bool
$_trigger  : TriggerInterface
check()  : bool
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
getDescription()  : string
getHandle()  : string
getName()  : string
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

$isDraft

public bool $isDraft

$_forTriggers

protected bool $_forTriggers = false

Methods

check()

public check(TriggerInterface $trigger, array<string|int, mixed> $data) : bool
Parameters
$trigger : TriggerInterface
$data : array<string|int, mixed>
Tags
inheritDoc
Return values
bool

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>

getDescription()

public getDescription() : string
Tags
inheritDoc
Return values
string

getHandle()

public getHandle() : string
Tags
inheritDoc
Return values
string

getName()

public getName() : string
Tags
inheritDoc
Return values
string

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
Tags
inheritDoc
Return values
array<string|int, mixed>|null

Search results