You are here

protected function RouteHelper::getThemeCompilerTargetRoute in Theme Compiler 8

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

Generate a route to execute a specific theme compiler target.

Parameters

\Drupal\theme_compiler\Plugin\ThemeCompilerTargetContext $context: The theme compiler context that contains common theme compiler route attributes and custom options necessary for execution.

Return value

\Symfony\Component\Routing\Route A route to execute a specific theme compiler target.

1 call to RouteHelper::getThemeCompilerTargetRoute()
RouteHelper::getThemeCompilerRoutes in src/Routing/RouteHelper.php
Generate a list of routes for a specific theme compiler's targets.

File

src/Routing/RouteHelper.php, line 89

Class

RouteHelper
Builds the dynamic routes provided by this theme.

Namespace

Drupal\theme_compiler\Routing

Code

protected function getThemeCompilerTargetRoute(ThemeCompilerTargetContext $context) {
  return new Route($context
    ->getTargetUri(), [
    '_controller' => self::COMPILER_CONTROLLER,
    'context' => $context,
  ], [
    '_access' => 'TRUE',
  ], [
    '_maintenance_access' => 'TRUE',
  ]);
}