function HelpTopicPluginManager::__construct

Same name in other branches
  1. 9 core/modules/help_topics/src/HelpTopicPluginManager.php \Drupal\help_topics\HelpTopicPluginManager::__construct()
  2. 8.9.x core/modules/help_topics/src/HelpTopicPluginManager.php \Drupal\help_topics\HelpTopicPluginManager::__construct()
  3. 11.x core/modules/help/src/HelpTopicPluginManager.php \Drupal\help\HelpTopicPluginManager::__construct()

Constructs a new HelpTopicManager object.

Parameters

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Extension\ThemeHandlerInterface $themeHandler: The theme handler.

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: Cache backend instance to use.

string $root: The app root.

Overrides DefaultPluginManager::__construct

File

core/modules/help/src/HelpTopicPluginManager.php, line 98

Class

HelpTopicPluginManager
Provides the default help_topic manager.

Namespace

Drupal\help

Code

public function __construct(ModuleHandlerInterface $module_handler, ThemeHandlerInterface $themeHandler, CacheBackendInterface $cache_backend, string $root) {
    // Note that the parent construct is not called because this class does not use
    // annotated class discovery.
    $this->moduleHandler = $module_handler;
    $this->alterInfo('help_topics_info');
    $this->setCacheBackend($cache_backend, 'help_topics');
}

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