StaticTriggers
in package
Build a set of simple, literal SQL triggers.
Tags
Table of Contents
Properties
- $triggers : array<string|int, mixed>
Methods
- __construct() : mixed
- StaticTriggers constructor.
- addTrigger() : StaticTriggers
- alterTriggerInfo() : mixed
- Add our list of triggers to the global list.
- getTriggers() : mixed
- onTriggerInfo() : mixed
- Add our list of triggers to the global list.
- setTriggers() : StaticTriggers
Properties
$triggers
private
array<string|int, mixed>
$triggers
A list of triggers, in the same format as hook_civicrm_triggerInfo.
Additionally, you may specify upgrade_check
to ensure that the trigger
is not installed during early upgrade steps (before key dependencies are met).
Ex: $triggers[0]['upgrade_check'] = array('table' => 'civicrm_case', 'column'=> 'modified_date');
Tags
Methods
__construct()
StaticTriggers constructor.
public
__construct(mixed $triggers) : mixed
Parameters
- $triggers : mixed
addTrigger()
public
addTrigger(mixed $trigger) : StaticTriggers
Parameters
- $trigger : mixed
Return values
StaticTriggersalterTriggerInfo()
Add our list of triggers to the global list.
public
alterTriggerInfo(array<string|int, mixed> &$info[, string|null $tableFilter = NULL ]) : mixed
Parameters
- $info : array<string|int, mixed>
-
See hook_civicrm_triggerInfo.
- $tableFilter : string|null = NULL
-
See hook_civicrm_triggerInfo.
Tags
getTriggers()
public
getTriggers() : mixed
onTriggerInfo()
Add our list of triggers to the global list.
public
onTriggerInfo(GenericHookEvent $e) : mixed
Parameters
- $e : GenericHookEvent
Tags
setTriggers()
public
setTriggers(mixed $triggers) : StaticTriggers
Parameters
- $triggers : mixed