1 field_test.entity.inc | field_test_delete_bundle($bundle) |
Deletes a bundle for test_entity objects.
Parameters
$bundle: The machine-readable name of the bundle to delete.
File
- core/
modules/ field/ tests/ field_test/ field_test.entity.inc, line 198 - Defines an entity type.
Code
function field_test_delete_bundle($bundle) {
$bundles = state_get('field_test_bundles', array('test_bundle' => array('label' => 'Test Bundle')));
unset($bundles[$bundle]);
state_set('field_test_bundles', $bundles);
$info = field_test_entity_info();
foreach ($info as $type => $type_info) {
field_attach_delete_bundle($type, $bundle);
}
}