function UrlMatcher::getAttributes
Same name in this branch
- 11.1.x vendor/symfony/routing/Matcher/UrlMatcher.php \Symfony\Component\Routing\Matcher\UrlMatcher::getAttributes()
Overrides UrlMatcher::getAttributes
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\RoutingCode
protected function getAttributes(Route $route, $name, array $attributes) : array {
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());
}