function RouteProviderLazyBuilder::getRouteProvider

Same name in other branches
  1. 9 core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php \Drupal\Core\Routing\RouteProviderLazyBuilder::getRouteProvider()
  2. 10 core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php \Drupal\Core\Routing\RouteProviderLazyBuilder::getRouteProvider()
  3. 11.x core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php \Drupal\Core\Routing\RouteProviderLazyBuilder::getRouteProvider()

Gets the real route provider service and rebuilds the router id necessary.

Return value

\Drupal\Core\Routing\RouteProviderInterface The route provider service.

File

core/lib/Drupal/Core/Routing/RouteProviderLazyBuilder.php, line 66

Class

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

Namespace

Drupal\Core\Routing

Code

protected function getRouteProvider() {
    if (!$this->rebuilt && !$this->rebuilding) {
        $this->routeBuilder
            ->rebuild();
        $this->rebuilt = TRUE;
    }
    return $this->routeProvider;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.