You are here

function eck__bundle__delete in Entity Construction Kit (ECK) 7.2

Same name and namespace in other branches
  1. 7.3 eck.bundle.inc \eck__bundle__delete()
  2. 7 eck.bundle.inc \eck__bundle__delete()

Delete the bundle of a given entity type.

Parameters

\EntityType $entity_type: The entity type of the bundle that will be deleted.

\Bundle $bundle: The bundle to be deleted.

See also

eck.classes.inc

1 call to eck__bundle__delete()
eck__bundle__delete_form_submit in ./eck.bundle.inc
Submit form callback to delete bundles.

File

./eck.bundle.inc, line 423

Code

function eck__bundle__delete($entity_type, $bundle) {

  // And finally we delete the bundle from the eck_type table.
  $bundle
    ->delete();
  drupal_set_message(t('The bundle %bundle from the entity type %entity_type has been deleted.', array(
    '%bundle' => $bundle->label,
    '%entity_type' => $entity_type->label,
  )));
}