protected function UrlMatcher::getAttributes in Drupal 9
1 call to UrlMatcher::getAttributes()
- Router::doMatchCollection in core/lib/Drupal/Core/Routing/Router.php
- Tries to match a URL with a set of routes.
File
- core/lib/Drupal/Core/Routing/UrlMatcher.php, line 48
Class
- UrlMatcher
- Drupal-specific URL Matcher; handles the Drupal "system path" mapping.
Namespace
Drupal\Core\Routing
Code
protected function getAttributes(Route $route, $name, array $attributes) {
if ($route instanceof RouteObjectInterface && is_string($route
->getRouteKey())) {
$name = $route
->getRouteKey();
}
$attributes[RouteObjectInterface::ROUTE_NAME] = $name;
$attributes[RouteObjectInterface::ROUTE_OBJECT] = $route;
return $this
->mergeDefaults($attributes, $route
->getDefaults());
}