function YamlRouteDiscovery::getRouteDefinitions
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Routing/YamlRouteDiscovery.php \Drupal\Core\Routing\YamlRouteDiscovery::getRouteDefinitions()
Retrieves all defined routes from .routing.yml files.
Return value
array The defined routes, keyed by provider.
File
-
core/
lib/ Drupal/ Core/ Routing/ YamlRouteDiscovery.php, line 90
Class
- YamlRouteDiscovery
- Reads routing.yml files provided by modules and creates route collections.
Namespace
Drupal\Core\RoutingCode
protected function getRouteDefinitions() {
// Always instantiate a new YamlDiscovery object so that we always search on
// the up-to-date list of modules.
$discovery = new YamlDiscovery('routing', $this->moduleHandler
->getModuleDirectories());
return $discovery->findAll();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.