function workbench_email_features_rebuild in Workbench Email 7.3
Same name and namespace in other branches
- 7 workbench_email.features.inc \workbench_email_features_rebuild()
Implements COMPONENT_features_rebuild().
Store each exported email transition in the database.
1 call to workbench_email_features_rebuild()
- workbench_email_features_revert in ./
workbench_email.features.inc - Implements COMPONENT_features_revert().
File
- ./
workbench_email.features.inc, line 92 - Features file for Workbench Email Module
Code
function workbench_email_features_rebuild($module) {
$defaults = features_get_default('workbench_email', $module);
if (is_array($defaults)) {
foreach ($defaults as $machine_name => $transition) {
$role = workbench_email_get_role_by_name($transition['role']);
$subject = !empty($transition['subject']) ? $transition['subject'] : NULL;
$message = !empty($transition['message']) ? $transition['message'] : NULL;
workbench_email_save((object) $transition, $role->rid, $subject, $message, $transition['author'], $transition['automatic']);
}
}
drupal_static_reset('workbench_email');
}