protected function RulesEntityController::storeTags in Rules 7.2
Save tagging information to the rules_tags table.
1 call to RulesEntityController::storeTags()
- RulesEntityController::save in includes/
rules.core.inc - Overridden to care exportables that are overridden.
File
- includes/
rules.core.inc, line 185 - Rules base classes and interfaces needed for any rule evaluation.
Class
- RulesEntityController
- Make sure loaded rule configs are instantiated right.
Code
protected function storeTags($rules_config) {
db_delete('rules_tags')
->condition('id', $rules_config->id)
->execute();
if (!empty($rules_config->tags)) {
foreach ($rules_config->tags as $tag) {
db_insert('rules_tags')
->fields(array(
'id',
'tag',
), array(
$rules_config->id,
$tag,
))
->execute();
}
}
}