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

Breadcrumb

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

function Router::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/routing/Router.php \Symfony\Component\Routing\Router::__construct()

Constructs a new Router.

Parameters

\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path stack.

\Symfony\Component\Routing\Generator\UrlGeneratorInterface $url_generator: The URL generator.

Overrides UrlMatcher::__construct

File

core/lib/Drupal/Core/Routing/Router.php, line 72

Class

Router
Router implementation in Drupal.

Namespace

Drupal\Core\Routing

Code

public function __construct(RouteProviderInterface $route_provider, CurrentPathStack $current_path, BaseUrlGeneratorInterface $url_generator) {
    parent::__construct($current_path);
    $this->routeProvider = $route_provider;
    $this->urlGenerator = $url_generator;
}

API Navigation

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