Drupal 8  8.0.2
RouteSubscriber Class Reference
Inheritance diagram for RouteSubscriber:

Public Member Functions

 __construct (EntityManagerInterface $entity_manager, StateInterface $state)
 
 reset ()
 
 routes ()
 
 routeRebuildFinished ()
 
- Public Member Functions inherited from RouteSubscriberBase
 onAlterRoutes (RouteBuildEvent $event)
 

Static Public Member Functions

static getSubscribedEvents ()
 
- Static Public Member Functions inherited from RouteSubscriberBase
static getSubscribedEvents ()
 

Protected Member Functions

 getViewsDisplayIDsWithRoute ()
 
 alterRoutes (RouteCollection $collection)
 
 getApplicableViews ()
 
- Protected Member Functions inherited from RouteSubscriberBase
 alterRoutes (RouteCollection $collection)
 

Protected Attributes

 $viewsDisplayPairs
 
 $viewStorage
 
 $state
 
 $viewRouteNames = array()
 

Detailed Description

Builds up the routes of all views.

The general idea is to execute first all alter hooks to determine which routes are overridden by views. This information is used to determine which views have to be added by views in the dynamic event.

See Also

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $entity_manager,
StateInterface  $state 
)

Constructs a instance.

Parameters
\Drupal\Core\Entity\EntityManagerInterface$entity_managerThe entity manager.
\Drupal\Core\State\StateInterface$stateThe state key value store.

References EntityTypeManagerInterface\getStorage(), and Drupal\state().

Here is the call graph for this function:

Member Function Documentation

alterRoutes ( RouteCollection  $collection)
protected

{}

References RouteSubscriber\getViewsDisplayIDsWithRoute().

Here is the call graph for this function:

getApplicableViews ( )
protected

Returns all views/display combinations with routes.

See Also
::getApplicableViews()

References Views\getApplicableViews().

Referenced by RouteSubscriber\getViewsDisplayIDsWithRoute().

Here is the call graph for this function:

Here is the caller graph for this function:

static getSubscribedEvents ( )
static

{}

getViewsDisplayIDsWithRoute ( )
protected

Gets all the views and display IDs using a route.

References RouteSubscriber\getApplicableViews().

Referenced by RouteSubscriber\alterRoutes(), and RouteSubscriber\routes().

Here is the call graph for this function:

Here is the caller graph for this function:

reset ( )

Resets the internal state of the route subscriber.

Referenced by RouteSubscriber\routeRebuildFinished().

Here is the caller graph for this function:

routeRebuildFinished ( )

{}

References RouteSubscriber\reset(), and Drupal\state().

Here is the call graph for this function:

routes ( )

Returns a set of route objects.

Returns
A route collection.

References RouteSubscriber\getViewsDisplayIDsWithRoute(), and Drupal\state().

Here is the call graph for this function:


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