You are here

function entity_module_preuninstall in Entity API 8

Implements hook_module_preuninstall().

File

./entity.module, line 138
Provides expanded entity APIs.

Code

function entity_module_preuninstall($module) {
  foreach (entity_get_bundle_plugin_entity_types() as $entity_type) {
    \Drupal::service('entity.bundle_plugin_installer')
      ->uninstallBundles($entity_type, [
      $module,
    ]);
  }
}