Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HelpSectionManager.php

function HelpSectionManager::clearCachedDefinitions

Overrides DefaultPluginManager::clearCachedDefinitions

File

core/modules/help/src/HelpSectionManager.php, line 59

Class

HelpSectionManager
Manages help page section plugins.

Namespace

Drupal\help

Code

public function clearCachedDefinitions() {
    parent::clearCachedDefinitions();
    // Search module may be missing. Help module might be installing,
    // so its search plugin may not be discovered yet.
    if ($this->searchManager && $this->searchManager
        ->hasDefinition('help_search')) {
        // Rebuild the index on cache clear so that new help topics are indexed
        // and any changes due to help topics edits or translation changes are
        // picked up.
        $help_search = $this->searchManager
            ->createInstance('help_search');
        $help_search->markForReindex();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal