You are here

protected function RouteBuilder::getRouteDefinitions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Routing/RouteBuilder.php \Drupal\Core\Routing\RouteBuilder::getRouteDefinitions()

Retrieves all defined routes from .routing.yml files.

Return value

array The defined routes, keyed by provider.

1 call to RouteBuilder::getRouteDefinitions()
RouteBuilder::rebuild in core/lib/Drupal/Core/Routing/RouteBuilder.php
Rebuilds the route info and dumps to dumper.
2 methods override RouteBuilder::getRouteDefinitions()
InstallerRouteBuilder::getRouteDefinitions in core/lib/Drupal/Core/Installer/InstallerRouteBuilder.php
Overridden to return no routes.
TestRouteBuilder::getRouteDefinitions in core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
Retrieves all defined routes from .routing.yml files.

File

core/lib/Drupal/Core/Routing/RouteBuilder.php, line 231
Contains \Drupal\Core\Routing\RouteBuilder.

Class

RouteBuilder
Managing class for rebuilding the router table.

Namespace

Drupal\Core\Routing

Code

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();
}