You are here

function entity_test_uninstall in Entity API 7

Implements hook_uninstall().

File

tests/entity_test.install, line 11
Install, update and uninstall functions for the entity_test module.

Code

function entity_test_uninstall() {

  // Bypass entity_load() as we cannot use it here.
  $types = db_select('entity_test_type', 'et')
    ->fields('et')
    ->execute()
    ->fetchAllAssoc('name');
  foreach ($types as $name => $type) {
    field_attach_delete_bundle('entity_test', $name);
  }
}