function ctools_component_features_revert in Features 7
Same name and namespace in other branches
- 6 includes/features.ctools.inc \ctools_component_features_revert()
- 7.2 includes/features.ctools.inc \ctools_component_features_revert()
Master implementation of hook_features_revert() for all ctools components.
1 call to ctools_component_features_revert()
- context_features_revert in includes/
features.context.inc - Implements hook_features_revert().
File
- includes/
features.ctools.inc, line 215
Code
function ctools_component_features_revert($component, $module) {
if ($objects = features_get_default($component, $module)) {
foreach ($objects as $name => $object) {
// Some things (like views) do not use the machine name as key
// and need to be loaded explicitly in order to be deleted.
$object = ctools_export_crud_load($component, $name);
if ($object && $object->export_type & EXPORT_IN_DATABASE) {
_ctools_features_export_crud_delete($component, $object);
}
}
}
}