Mercurial > hg > isophonics-drupal-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
389 | 389 |
390 // Clean up all entity bundles (including fields) of every entity type | 390 // Clean up all entity bundles (including fields) of every entity type |
391 // provided by the module that is being uninstalled. | 391 // provided by the module that is being uninstalled. |
392 // @todo Clean this up in https://www.drupal.org/node/2350111. | 392 // @todo Clean this up in https://www.drupal.org/node/2350111. |
393 $entity_manager = \Drupal::entityManager(); | 393 $entity_manager = \Drupal::entityManager(); |
394 $entity_type_bundle_info = \Drupal::service('entity_type.bundle.info'); | |
394 foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) { | 395 foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) { |
395 if ($entity_type->getProvider() == $module) { | 396 if ($entity_type->getProvider() == $module) { |
396 foreach (array_keys($entity_manager->getBundleInfo($entity_type_id)) as $bundle) { | 397 foreach (array_keys($entity_type_bundle_info->getBundleInfo($entity_type_id)) as $bundle) { |
397 $entity_manager->onBundleDelete($bundle, $entity_type_id); | 398 \Drupal::service('entity_bundle.listener')->onBundleDelete($bundle, $entity_type_id); |
398 } | 399 } |
399 } | 400 } |
400 } | 401 } |
401 | 402 |
402 // Allow modules to react prior to the uninstallation of a module. | 403 // Allow modules to react prior to the uninstallation of a module. |