protected function RouteHelper::getThemeCompilerTargetRoute in Theme Compiler 2.0.x
Same name and namespace in other branches
- 8 src/Routing/RouteHelper.php \Drupal\theme_compiler\Routing\RouteHelper::getThemeCompilerTargetRoute()
Generate a route to a specific theme-provided, compiled asset.
Parameters
\Drupal\compiler\CompilerContextInterface $context: The source context which defines or configures the compilation.
Return value
\Symfony\Component\Routing\Route A route to a theme-provided, compiled assets.
1 call to RouteHelper::getThemeCompilerTargetRoute()
- RouteHelper::getThemeCompilerRoutes in src/
Routing/ RouteHelper.php - Generate a list of routes for a specific compiler's targets.
File
- src/
Routing/ RouteHelper.php, line 142
Class
- RouteHelper
- Builds the route(s) that facilitate compilation of theme-provided assets.
Namespace
Drupal\theme_compiler\RoutingCode
protected function getThemeCompilerTargetRoute(CompilerContextInterface $context) : Route {
$route = new Route($context
->getOption('theme_compiler')['uri'], [
'_controller' => self::COMPILER_CONTROLLER,
'theme_compiler_context' => $context,
], [
'_access' => 'TRUE',
], [
'_maintenance_access' => 'TRUE',
]);
return $route;
}