You are here

function glossify_uninstall in Glossify 8

Same name and namespace in other branches
  1. 6.3 glossify.install \glossify_uninstall()
  2. 6 glossify.install \glossify_uninstall()

Implements hook_uninstall().

This removes the filters when the module is uninstalled.

File

./glossify.install, line 13
Install and uninstall functions for the glossify module.

Code

function glossify_uninstall() {

  /* @var $ConfigManager  Drupal\Core\Config\ConfigManager */
  $filters = filter_formats();
  foreach ($filters as $name => $filter) {

    /* @var $filter Drupal\filter\Entity\FilterFormat */
    $filter
      ->removeFilter('glossify_node');
    $filter
      ->removeFilter('glossify_taxonomy');
    $filter
      ->save();
  }
}