public function RouteProviderLazyBuilder::getRoutesPaged

public RouteProviderLazyBuilder::getRoutesPaged($offset, $length = NULL)

Find an amount of routes with an offset and possible a limit.

In case you want to iterate over all routes, you want to avoid to load all routes at once.

Parameters

int $offset: The sequence will start with that offset in the list of all routes.

int $length [optional]: The sequence will have that many routes in it. If no length is specified all routes are returned.

Return value

\Symfony\Component\Routing\Route[] Routes keyed by the route name.

Overrides PagedRouteProviderInterface::getRoutesPaged

File

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

Class

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

Namespace

Drupal\Core\Routing

Code

public function getRoutesPaged($offset, $length = NULL) {
  return $this->getRouteProvider()->getRoutesPaged($offset, $length);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!RouteProviderLazyBuilder.php/function/RouteProviderLazyBuilder::getRoutesPaged/8.1.x