RouteProviderLazyBuilder
class RouteProviderLazyBuilder implements PreloadableRouteProviderInterface, PagedRouteProviderInterface, EventSubscriberInterface (View source)
A Route Provider front-end for all Drupal-stored routes.
Properties
| protected RouteProviderInterface | $routeProvider | The route provider service. |
|
| protected RouteBuilderInterface | $routeBuilder | The route building service. |
|
| protected bool | $rebuilt | Flag to determine if the router has been rebuilt. |
|
| protected bool | $rebuilding | Flag to determine if router is currently being rebuilt. |
Methods
RouteProviderLazyBuilder constructor.
Gets the real route provider service and rebuilds the router id necessary.
{@inheritdoc}
{@inheritdoc}
Pre-load routes by their names using the provided list of names.
{@inheritdoc}
Get all routes which match a certain pattern.
Returns all the routes on the system.
Resets the route provider object.
{@inheritdoc}
{@inheritdoc}
Determines if the router has been rebuilt.
{@inheritdoc}
Sets the router rebuilding flag to TRUE.
Sets the router rebuilding flag to FALSE.
Details
__construct(RouteProviderInterface $route_provider, RouteBuilderInterface $route_builder)
RouteProviderLazyBuilder constructor.
protected RouteProviderInterface
getRouteProvider()
Gets the real route provider service and rebuilds the router id necessary.
getRouteCollectionForRequest(Request $request)
{@inheritdoc}
getRouteByName($name)
{@inheritdoc}
preLoadRoutes(string[] $names)
Pre-load routes by their names using the provided list of names.
This method exists in order to allow performance optimizations. It allows pre-loading serialized routes that may latter be retrieved using ::getRoutesByName()
getRoutesByNames($names)
{@inheritdoc}
RouteCollection
getRoutesByPattern(string $pattern)
Get all routes which match a certain pattern.
Route[]
getAllRoutes()
Returns all the routes on the system.
Usage of this method is discouraged for performance reasons. If possible, use RouteProviderInterface::getRoutesByNames() or RouteProviderInterface::getRoutesByPattern() instead.
reset()
Resets the route provider object.
getRoutesPaged($offset, $length = NULL)
{@inheritdoc}
getRoutesCount()
{@inheritdoc}
bool
hasRebuilt()
Determines if the router has been rebuilt.
static
getSubscribedEvents()
{@inheritdoc}
routerRebuilding()
Sets the router rebuilding flag to TRUE.
routerRebuildFinished()
Sets the router rebuilding flag to FALSE.