function RouteProvider::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::__construct()
- 8.9.x core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\RouteProvider::__construct()
- 11.x core/lib/Drupal/Core/Routing/RouteProvider.php \Drupal\Core\Routing\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\RoutingCode
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();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.