Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/Extension/ModuleInstaller.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php Thu May 09 15:33:08 2019 +0100 @@ -391,10 +391,11 @@ // provided by the module that is being uninstalled. // @todo Clean this up in https://www.drupal.org/node/2350111. $entity_manager = \Drupal::entityManager(); + $entity_type_bundle_info = \Drupal::service('entity_type.bundle.info'); foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) { if ($entity_type->getProvider() == $module) { - foreach (array_keys($entity_manager->getBundleInfo($entity_type_id)) as $bundle) { - $entity_manager->onBundleDelete($bundle, $entity_type_id); + foreach (array_keys($entity_type_bundle_info->getBundleInfo($entity_type_id)) as $bundle) { + \Drupal::service('entity_bundle.listener')->onBundleDelete($bundle, $entity_type_id); } } }