function help_topics_modules_uninstalled

Same name in other branches
  1. 9 core/modules/help_topics/help_topics.module \help_topics_modules_uninstalled()

Implements hook_modules_uninstalled().

1 call to help_topics_modules_uninstalled()
help_topics_themes_uninstalled in core/modules/help_topics/help_topics.module
Implements hook_themes_uninstalled().

File

core/modules/help_topics/help_topics.module, line 62

Code

function help_topics_modules_uninstalled(array $modules) {
    // Early return if search is not installed or if we're uninstalling this
    // module.
    if (!\Drupal::hasService('plugin.manager.search') || in_array('help_topics', $modules)) {
        return;
    }
    $search_plugin_manager = \Drupal::service('plugin.manager.search');
    if ($search_plugin_manager->hasDefinition('help_search')) {
        // Ensure that topics for extensions that have been uninstalled are removed.
        $help_search = $search_plugin_manager->createInstance('help_search');
        $help_search->updateTopicList();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.