function YamlRouteDiscovery::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Routing/YamlRouteDiscovery.php \Drupal\Core\Routing\YamlRouteDiscovery::__construct()
File
-
core/
lib/ Drupal/ Core/ Routing/ YamlRouteDiscovery.php, line 18
Class
- YamlRouteDiscovery
- Reads routing.yml files provided by modules and creates route collections.
Namespace
Drupal\Core\RoutingCode
public function __construct(protected readonly ModuleHandlerInterface $moduleHandler, protected readonly ControllerResolverInterface $controllerResolver, protected ?CacheCollectorInterface $yamlCacheCollector) {
if (!isset($yamlCacheCollector)) {
$this->yamlCacheCollector = \Drupal::service('routing.yaml_cache_collector');
@trigger_error('Calling ' . __METHOD__ . '() without the $yamlCacheCollector argument is deprecated in drupal:11.4.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3486503', E_USER_DEPRECATED);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.