You are here

function uuid_file_entity_features_rebuild in UUID Features Integration 7

Implements hook_features_rebuild().

Rebuilds files based on UUID from code defaults.

2 calls to uuid_file_entity_features_rebuild()
file_entity_uuid_entity_features_rebuild_alter in includes/modules/file_entity.inc
Implements hook_uuid_entity_features_rebuild_alter().
uuid_file_entity_features_revert in includes/uuid_file_entity.features.inc
Implements hook_features_revert().

File

includes/uuid_file_entity.features.inc, line 151
Features hooks for the uuid_file_entity features component.

Code

function uuid_file_entity_features_rebuild($module) {
  $rebuild_cache =& drupal_static(__FUNCTION__, array());
  if (!isset($rebuild_cache[$module])) {
    $rebuild_cache[$module] = TRUE;
    module_load_include('inc', 'features', 'features.export');
    $files = features_get_default('uuid_file_entity', $module);
    if (!empty($files)) {
      $rebuild_cache[$module] = uuid_file_entity_features_rebuild_files($files, $module);
      $entity_type = 'file';
      module_invoke_all('uuid_entity_features_rebuild_complete', $entity_type, $files, $module);
    }
  }
  return $rebuild_cache[$module];
}