function HelpTopicTwigLoader::__construct
Constructs a new HelpTopicTwigLoader object.
Parameters
string $root_path: The root path.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.
\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler service.
Overrides FilesystemLoader::__construct
File
-
core/
modules/ help/ src/ HelpTopicTwigLoader.php, line 44
Class
- HelpTopicTwigLoader
- Loads help topic Twig files from the filesystem.
Namespace
Drupal\helpCode
public function __construct($root_path, ModuleHandlerInterface $module_handler, ThemeHandlerInterface $theme_handler) {
parent::__construct([], $root_path);
// Add help_topics directories for modules and themes in the 'help_topic'
// namespace, plus core.
$this->addExtension($root_path . '/core');
array_map([
$this,
'addExtension',
], $module_handler->getModuleDirectories());
array_map([
$this,
'addExtension',
], $theme_handler->getThemeDirectories());
}