function uuid_entities_rebuild in Universally Unique IDentifier 7
Helper function to rebuild entities from a plan.
2 calls to uuid_entities_rebuild()
- uuid_entities_features_rebuild in ./
uuid.features.inc - Implements [component]_features_rebuild().
- uuid_entities_features_revert in ./
uuid.features.inc - Implements [component]_features_revert().
File
- ./
uuid.features.inc, line 164 - Features support to export entities from any Deploy <em>fetch-only</em> plan.
Code
function uuid_entities_rebuild($module_name = '', $op = 'rebuild') {
features_include_defaults(array(
'uuid_entities',
));
$entities = module_invoke($module_name, 'uuid_default_entities');
if (!empty($entities)) {
foreach ($entities as $plan_name => $entities) {
// Let other modules do things before default entities are created.
module_invoke_all("uuid_entities_pre_{$op}", $plan_name);
drupal_alter("uuid_entities_pre_{$op}", $entities, $plan_name);
foreach ($entities as $entity) {
entity_uuid_save($entity->__metadata['type'], $entity);
}
// Let other modules do things after default entities are created.
module_invoke_all("uuid_entities_post_{$op}", $plan_name);
}
}
}