You are here

function groupmedia_uninstall in Group Media 8.2

Implements hook_uninstall().

File

./groupmedia.install, line 11
Install, update and uninstall functions for the groupmedia module.

Code

function groupmedia_uninstall() {
  if (\Drupal::moduleHandler()
    ->moduleExists('views')) {
    $view = \Drupal::entityTypeManager()
      ->getStorage('view')
      ->load('group_media');
    if ($view) {

      // Remove the view because it is used only by groupmedia module.
      $view
        ->delete();
    }
  }
}