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

Breadcrumb

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

function RouteProvider::__construct

Constructs a new PathMatcher.

Parameters

\Drupal\Core\Database\Connection $connection: A database connection object.

\Drupal\Core\State\StateInterface $state: The state.

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

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

\Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor: The path processor.

\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tag_invalidator: The cache tag invalidator.

string $table: (Optional) The table in the database to use for matching. Defaults to 'router'

\Drupal\Core\Language\LanguageManagerInterface $language_manager: (Optional) The language manager.

File

core/lib/Drupal/Core/Routing/RouteProvider.php, line 128

Class

RouteProvider
A Route Provider front-end for all Drupal-stored routes.

Namespace

Drupal\Core\Routing

Code

public function __construct(Connection $connection, StateInterface $state, CurrentPathStack $current_path, CacheBackendInterface $cache_backend, InboundPathProcessorInterface $path_processor, CacheTagsInvalidatorInterface $cache_tag_invalidator, $table = 'router', ?LanguageManagerInterface $language_manager = NULL) {
    $this->connection = $connection;
    $this->state = $state;
    $this->currentPath = $current_path;
    $this->cache = $cache_backend;
    $this->cacheTagInvalidator = $cache_tag_invalidator;
    $this->pathProcessor = $path_processor;
    $this->tableName = $table;
    $this->languageManager = $language_manager ?: \Drupal::languageManager();
}

API Navigation

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