Skip to content

Commit

Permalink
[apigee#72] Refactor entity storage to a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
shadcn committed Jul 11, 2019
1 parent acacffd commit abb544c
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -45,8 +45,9 @@ function apigee_kickstart_content_uninstall() {
$module = Drupal::service('extension.list.module')->get('apigee_kickstart_content');
// Delete imported entities.
foreach ($module->info['default_content'] as $entity_type_id => $entity_ids) {
if (!empty($entity_ids) && ($entities = $entity_type_manager->getStorage($entity_type_id)->loadByProperties(['uuid' => $entity_ids]))) {
$entity_type_manager->getStorage($entity_type_id)->delete($entities);
$storage = $entity_type_manager->getStorage($entity_type_id);
if (!empty($entity_ids) && ($entities = $storage->loadByProperties(['uuid' => $entity_ids]))) {
$storage->delete($entities);
}
}
}

0 comments on commit abb544c

Please sign in to comment.