You are here

function view_revisions_uninstall in Config Entity Revisions 8.2

Implements hook_uninstall().

File

modules/view_revisions/view_revisions.install, line 26
view_revisions install hooks.

Code

function view_revisions_uninstall() {
  $entityTypeManager = \Drupal::entityTypeManager();
  $cert_storage = $entityTypeManager
    ->getStorage('config_entity_revisions_type');
  $entities = $cert_storage
    ->loadByProperties([
    'type' => 'view_revisions',
  ]);
  if ($entities) {
    $cert_storage
      ->delete([
      $entities,
    ]);
  }
  Drupal::configFactory()
    ->getEditable('config_entity_revisions.config_entity_revisions_type.view_revisions')
    ->delete();
}