function hook_field_attach_delete_bundle
Act on field_attach_delete_bundle.
This hook is invoked after the field module has performed the operation.
Parameters
$entity_type: The type of entity; for example, 'node' or 'user'.
$bundle: The name of the bundle that was just deleted.
$instances: An array of all instances that existed for the bundle before it was deleted.
Related topics
1 function implements hook_field_attach_delete_bundle()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- field_test_field_attach_delete_bundle in modules/
field/ tests/ field_test.storage.inc - Implements hook_field_attach_delete_bundle().
1 invocation of hook_field_attach_delete_bundle()
- field_attach_delete_bundle in modules/
field/ field.attach.inc - Notify field.module the a bundle was deleted.
File
-
modules/
field/ field.api.php, line 1633
Code
function hook_field_attach_delete_bundle($entity_type, $bundle, $instances) {
// Remove the extra weights variable information for this bundle.
$extra_weights = variable_get('field_extra_weights', array());
if (isset($extra_weights[$entity_type][$bundle])) {
unset($extra_weights[$entity_type][$bundle]);
variable_set('field_extra_weights', $extra_weights);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.