help.module

Same filename and directory in other branches
  1. 7.x modules/help/help.module
  2. 9 core/modules/help/help.module
  3. 10 core/modules/help/help.module
  4. 8.9.x core/modules/help/help.module

File

core/modules/help/help.module

View source
<?php


/**
 * @file
 */


/**
 * Ensure that search is updated when extensions are installed or uninstalled.
 *
 * @param string[] $extensions
 *   (optional) If modules are being uninstalled, the names of the modules
 *   being uninstalled. For themes being installed/uninstalled, or modules
 *   being installed, omit this parameter.
 */
function _help_search_update(array $extensions = []) : void {
  // Early return if search is not installed or if we're uninstalling this
  // module.
  if (!\Drupal::hasService('plugin.manager.search') || in_array('help', $extensions)) {
    return;
  }
  // Ensure that topics for extensions that have been uninstalled are removed
  // and that the index state variable is updated.
  $help_search = \Drupal::service('plugin.manager.search')->createInstance('help_search');
  $help_search->updateTopicList();
  $help_search->updateIndexState();
}

Functions

Title Deprecated Summary
_help_search_update Ensure that search is updated when extensions are installed or uninstalled.

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