Drupal 8  8.0.2
RouteBuilder Class Reference
Inheritance diagram for RouteBuilder:

Public Member Functions

 __construct (MatcherDumperInterface $dumper, LockBackendInterface $lock, EventDispatcherInterface $dispatcher, ModuleHandlerInterface $module_handler, ControllerResolverInterface $controller_resolver, CheckProviderInterface $check_provider)
 
 setRebuildNeeded ()
 
 rebuild ()
 
 rebuildIfNeeded ()
 
 destruct ()
 

Protected Member Functions

 getRouteDefinitions ()
 

Protected Attributes

 $dumper
 
 $lock
 
 $dispatcher
 
 $moduleHandler
 
 $controllerResolver
 
 $routeCollection
 
 $building = FALSE
 
 $rebuildNeeded = FALSE
 
 $checkProvider
 

Detailed Description

Managing class for rebuilding the router table.

Constructor & Destructor Documentation

__construct ( MatcherDumperInterface  $dumper,
LockBackendInterface  $lock,
EventDispatcherInterface  $dispatcher,
ModuleHandlerInterface  $module_handler,
ControllerResolverInterface  $controller_resolver,
CheckProviderInterface  $check_provider 
)

Constructs the RouteBuilder using the passed MatcherDumperInterface.

Parameters
\Drupal\Core\Routing\MatcherDumperInterface$dumperThe matcher dumper used to store the route information.
\Drupal\Core\Lock\LockBackendInterface$lockThe lock backend.
\Symfony\Component\EventDispatcher\EventDispatcherInterface$dispatcherThe event dispatcher to notify of routes.
\Drupal\Core\Extension\ModuleHandlerInterface$module_handlerThe module handler.
\Drupal\Core\Controller\ControllerResolverInterface$controller_resolverThe controller resolver.
\Drupal\Core\Access\CheckProviderInterface$check_providerThe check provider.

References RouteBuilder\$lock, Drupal\lock(), and Drupal\moduleHandler().

Here is the call graph for this function:

Member Function Documentation

destruct ( )

{Performs destruct operations.}

Implements DestructableInterface.

References RouteBuilder\rebuildIfNeeded().

Here is the call graph for this function:

getRouteDefinitions ( )
protected

Retrieves all defined routes from .routing.yml files.

Returns
array The defined routes, keyed by provider.

References YamlDiscovery\findAll(), and Drupal\moduleHandler().

Referenced by RouteBuilder\rebuild().

Here is the call graph for this function:

Here is the caller graph for this function:

rebuild ( )

{Rebuilds the route info and dumps to dumper.

Returns
bool Returns TRUE if the rebuild succeeds, FALSE otherwise.
}

Implements RouteBuilderInterface.

References RouteBuilder\getRouteDefinitions(), and Drupal\lock().

Referenced by RouteBuilder\rebuildIfNeeded().

Here is the call graph for this function:

Here is the caller graph for this function:

rebuildIfNeeded ( )

{Rebuilds the route info and dumps to dumper if necessary.

Returns
bool Returns TRUE if the rebuild occurs, FALSE otherwise.
}

Implements RouteBuilderInterface.

References RouteBuilder\rebuild().

Referenced by RouteBuilder\destruct().

Here is the call graph for this function:

Here is the caller graph for this function:

setRebuildNeeded ( )

{Sets the router to be rebuilt next time rebuildIfNeeded() is called.}

Implements RouteBuilderInterface.

Field Documentation

Drupal Core Lock LockBackendInterface $lock
protected

The used lock backend instance.

Referenced by RouteBuilder\__construct().


The documentation for this class was generated from the following file: