function uuid_node_features_rebuild in UUID Features Integration 7
Same name and namespace in other branches
- 6 includes/uuid_node.features.inc \uuid_node_features_rebuild()
Implements hook_features_rebuild().
Rebuilds nodes based on UUID from code defaults.
4 calls to uuid_node_features_rebuild()
- uuid_field_collection_features_rebuild in includes/
uuid_field_collection.features.inc - Implements hook_features_rebuild().
- uuid_node_features_revert in includes/
uuid_node.features.inc - Implements hook_features_revert().
- uuid_paragraphs_features_rebuild in includes/
uuid_paragraphs.features.inc - Implements hook_features_rebuild().
- uuid_user_features_rebuild in includes/
uuid_user.features.inc - Implements hook_features_rebuild().
File
- includes/
uuid_node.features.inc, line 180 - Features hooks for the uuid_node features component.
Code
function uuid_node_features_rebuild($module) {
$return = TRUE;
variable_set('menu_rebuild_needed', FALSE);
lock_acquire('menu_rebuild');
if (function_exists('uuid_term_features_rebuild')) {
// Import the terms first.
uuid_term_features_rebuild($module);
}
$nodes = features_get_default('uuid_node', $module);
if (!empty($nodes)) {
module_load_include('inc', 'node', 'node.pages');
$tmp = array();
foreach ($nodes as $key => $data) {
if (isset($data['og_group_ref'])) {
$tmp[] = $data;
unset($nodes[$key]);
}
}
$nodes = array_merge($nodes, $tmp);
$return = uuid_node_features_rebuild_nodes($nodes, $module);
$entity_type = 'node';
module_invoke_all('uuid_entity_features_rebuild_complete', $entity_type, $nodes, $module);
}
return $return;
}