You are here

protected function RouteHelper::getThemeRoutes in Theme Compiler 2.0.x

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

Generate a list of routes for a specific theme's compiler configuration.

Parameters

string $theme: The machine name of the theme for which routes should be generated.

array $compilers: An associative array of compiler target configurations keyed by the desired compiler's plugin identifier.

Return value

\Generator A collection of routes for the provided theme's compiler configuration.

1 call to RouteHelper::getThemeRoutes()
RouteHelper::routes in src/Routing/RouteHelper.php
Generate a list of routes for all applicable compiler configurations.

File

src/Routing/RouteHelper.php, line 167

Class

RouteHelper
Builds the route(s) that facilitate compilation of theme-provided assets.

Namespace

Drupal\theme_compiler\Routing

Code

protected function getThemeRoutes(string $theme, array $compilers) : \Generator {
  foreach ($compilers as $compiler => $targets) {
    foreach ($this
      ->getThemeCompilerRoutes($theme, $compiler, $targets) as $name => $route) {
      (yield $name => $route);
    }
  }
}