1 field.api.php | hook_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new) |
Act on field_attach_rename_bundle().
This hook is invoked after the field module has performed the operation.
See field_attach_rename_bundle() for details and arguments.
Related topics
File
- core/
modules/ field/ field.api.php, line 1657 - Hooks provided by the Field module.
Code
function hook_field_attach_rename_bundle($entity_type, $bundle_old, $bundle_new) {
// Update the extra weights variable with new information.
if ($bundle_old !== $bundle_new) {
$extra_weights = config_get('my_module.settings', 'field_extra_weights');
if (isset($info[$entity_type][$bundle_old])) {
$extra_weights[$entity_type][$bundle_new] = $extra_weights[$entity_type][$bundle_old];
unset($extra_weights[$entity_type][$bundle_old]);
config_get('my_module.settings', 'field_extra_weights');
}
}
}