class HelpSectionManager
Same name in this branch
- 9 core/modules/help/src/HelpSectionManager.php \Drupal\help\HelpSectionManager
Same name and namespace in other branches
- 11.x core/modules/help/src/HelpSectionManager.php \Drupal\help\HelpSectionManager
Decorates the Help Section plugin manager to provide help topic search.
@internal Help Topics is currently experimental and should only be leveraged by experimental modules and development releases of contributed modules. See https://www.drupal.org/core/experimental for more information.
Hierarchy
- class \Drupal\Component\Plugin\PluginManagerBase extends \Drupal\Component\Plugin\PluginManagerInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryTrait
- class \Drupal\Core\Plugin\DefaultPluginManager extends \Drupal\Component\Plugin\PluginManagerInterface, \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait, \Drupal\Core\Cache\UseCacheBackendTrait implements \Drupal\Component\Plugin\PluginManagerBase
- class \Drupal\help\HelpSectionManager implements \Drupal\Core\Plugin\DefaultPluginManager
- class \Drupal\help_topics\HelpSectionManager implements \Drupal\help\HelpSectionManager
- class \Drupal\help\HelpSectionManager implements \Drupal\Core\Plugin\DefaultPluginManager
- class \Drupal\Core\Plugin\DefaultPluginManager extends \Drupal\Component\Plugin\PluginManagerInterface, \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface, \Drupal\Core\Cache\CacheableDependencyInterface uses \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait, \Drupal\Core\Cache\UseCacheBackendTrait implements \Drupal\Component\Plugin\PluginManagerBase
Expanded class hierarchy of HelpSectionManager
1 string reference to 'HelpSectionManager'
- help_topics.services.yml in core/
modules/ help_topics/ help_topics.services.yml - core/modules/help_topics/help_topics.services.yml
1 service uses HelpSectionManager
- plugin.manager.help_section_topics in core/
modules/ help_topics/ help_topics.services.yml - Drupal\help_topics\HelpSectionManager
File
-
core/
modules/ help_topics/ src/ HelpSectionManager.php, line 16
Namespace
Drupal\help_topicsView source
class HelpSectionManager extends CoreHelpSectionManager {
/**
* The search manager.
*
* @var \Drupal\Component\Plugin\PluginManagerInterface
*/
protected $searchManager;
/**
* Sets the search manager.
*
* @param \Drupal\Component\Plugin\PluginManagerInterface|null $search_manager
* The search manager if the Search module is installed.
*/
public function setSearchManager(PluginManagerInterface $search_manager = NULL) {
$this->searchManager = $search_manager;
}
/**
* {@inheritdoc}
*/
public function clearCachedDefinitions() {
parent::clearCachedDefinitions();
if ($this->searchManager && $this->searchManager
->hasDefinition('help_search') && $this->moduleHandler
->moduleExists('help_topics')) {
// 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();
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.