Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UrlMatcher.php

function UrlMatcher::getAttributes

Same name in this branch
  1. 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\Routing

Code

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());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal