You are here

public function RouteHelper::__construct in Theme Compiler 8

Same name and namespace in other branches
  1. 2.0.x src/Routing/RouteHelper.php \Drupal\theme_compiler\Routing\RouteHelper::__construct()

Constructs a new RouteHelper used for building dynamic compiler routes.

Parameters

\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler service provided by Drupal.

File

src/Routing/RouteHelper.php, line 35

Class

RouteHelper
Builds the dynamic routes provided by this theme.

Namespace

Drupal\theme_compiler\Routing

Code

public function __construct(ThemeHandlerInterface $theme_handler) {

  // Retrieve a list of file system paths to theme directories.
  $theme_directories = $theme_handler
    ->getThemeDirectories();

  // Create a new YAML discovery plugin for 'theme_compiler' configuration.
  $this->discovery = new YamlDiscovery('theme_compiler', $theme_directories);
}