You are here

public function RouteHelper::routes in Theme Compiler 8

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

Generate a list of routes for all applicable theme compiler configurations.

Return value

\Symfony\Component\Routing\Route[] A collection of routes produced by this module.

File

src/Routing/RouteHelper.php, line 126

Class

RouteHelper
Builds the dynamic routes provided by this theme.

Namespace

Drupal\theme_compiler\Routing

Code

public function routes() {
  foreach ($this->discovery
    ->findAll() as $theme => $compilers) {
    yield from $this
      ->getThemeRoutes($theme, $compilers);
  }
}