function field_test_delete_bundle
Deletes a bundle for test_entity objects.
Parameters
$bundle: The machine-readable name of the bundle to delete.
1 call to field_test_delete_bundle()
- FieldAttachStorageTestCase::testFieldAttachDeleteBundle in modules/
field/ tests/ field.test - Test field_attach_delete_bundle().
File
-
modules/
field/ tests/ field_test.entity.inc, line 202
Code
function field_test_delete_bundle($bundle) {
$bundles = variable_get('field_test_bundles', array(
'test_bundle' => array(
'label' => 'Test Bundle',
),
));
unset($bundles[$bundle]);
variable_set('field_test_bundles', $bundles);
$info = field_test_entity_info();
foreach ($info as $type => $type_info) {
field_attach_delete_bundle($type, $bundle);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.