function RulesEntityController::storeEvents
Save event information to the rules_trigger table.
1 call to RulesEntityController::storeEvents()
- RulesEntityController::save in includes/
rules.core.inc
File
-
includes/
rules.core.inc, line 201
Class
- RulesEntityController
- Make sure loaded rule configs are instantiated right.
Code
protected function storeEvents(RulesTriggerableInterface $rules_config) {
db_delete('rules_trigger')->condition('id', $rules_config->id)
->execute();
foreach ($rules_config->events() as $event) {
db_insert('rules_trigger')->fields(array(
'id' => $rules_config->id,
'event' => $event,
))
->execute();
}
}