public function HelpTopicPluginManager::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/help_topics/src/HelpTopicPluginManager.php \Drupal\help_topics\HelpTopicPluginManager::__construct()
- 9 core/modules/help_topics/src/HelpTopicPluginManager.php \Drupal\help_topics\HelpTopicPluginManager::__construct()
Constructs a new HelpTopicManager object.
Parameters
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: 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_topics/ src/ HelpTopicPluginManager.php, line 117
Class
- HelpTopicPluginManager
- Provides the default help_topic manager.
Namespace
Drupal\help_topicsCode
public function __construct(ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler, CacheBackendInterface $cache_backend, $root) {
// Note that the parent construct is not called because this not use
// annotated class discovery.
$this->moduleHandler = $module_handler;
$this->themeHandler = $theme_handler;
$this
->alterInfo('help_topics_info');
// Use the 'config:core.extension' cache tag so the plugin cache is
// invalidated on theme install and uninstall.
$this
->setCacheBackend($cache_backend, 'help_topics', [
'config:core.extension',
]);
$this->root = (string) $root;
}