RouteSubscriberBase

Provides a base implementation for RouteSubscriber. Hierarchy class \Drupal\Core\Routing\RouteSubscriberBase implements EventSubscriberInterface File core/lib/Drupal/Core/Routing/RouteSubscriberBase.php, line 11 Namespace Drupal\Core\Routing Members Name Modifiers Type Description RouteSubscriberBase::alterRoutes abstract protected function Alters existing routes for a specific collection. RouteSubscriberBase::getSubscribedEvents public static function Returns an

RouteSubscriber::__construct

public RouteSubscriber::__construct(EntityManagerInterface $entity_manager, StateInterface $state) Constructs a \Drupal\views\EventSubscriber\RouteSubscriber instance. Parameters \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager. \Drupal\Core\State\StateInterface $state: The state key value store. File core/modules/views/src/EventSubscriber/RouteSubscriber.php, line 62 Class RouteSubscriber Builds up the routes of all views. Namespace Drupal\views\EventSubs

RouteSubscriber::__construct

public RouteSubscriber::__construct(EntityManagerInterface $manager) Constructs a RouteSubscriber object. Parameters \Drupal\Core\Entity\EntityManagerInterface $manager: The entity type manager. File core/modules/field_ui/src/Routing/RouteSubscriber.php, line 29 Class RouteSubscriber Subscriber for Field UI routes. Namespace Drupal\field_ui\Routing Code public function __construct(EntityManagerInterface $manager) { $this->manager = $manager; }

RouteSubscriber::__construct

public RouteSubscriber::__construct(ConfigMapperManagerInterface $mapper_manager) Constructs a new RouteSubscriber. Parameters \Drupal\config_translation\ConfigMapperManagerInterface $mapper_manager: The mapper plugin discovery service. File core/modules/config_translation/src/Routing/RouteSubscriber.php, line 28 Class RouteSubscriber Listens to the dynamic route events. Namespace Drupal\config_translation\Routing Code public function __construct(ConfigMapperManagerInterface $mapper_m

RouteSubscriber::routes

public RouteSubscriber::routes() Returns a set of route objects. Return value \Symfony\Component\Routing\RouteCollection A route collection. File core/modules/views/src/EventSubscriber/RouteSubscriber.php, line 111 Class RouteSubscriber Builds up the routes of all views. Namespace Drupal\views\EventSubscriber Code public function routes() { $collection = new RouteCollection(); foreach ($this->getViewsDisplayIDsWithRoute() as $pair) { list($view_id, $display_id) = explode('.

RouteSubscriber::routeRebuildFinished

public RouteSubscriber::routeRebuildFinished() File core/modules/views/src/EventSubscriber/RouteSubscriber.php, line 161 Class RouteSubscriber Builds up the routes of all views. Namespace Drupal\views\EventSubscriber Code public function routeRebuildFinished() { $this->reset(); $this->state->set('views.view_route_names', $this->viewRouteNames); }

RouteSubscriber::reset

public RouteSubscriber::reset() Resets the internal state of the route subscriber. File core/modules/views/src/EventSubscriber/RouteSubscriber.php, line 70 Class RouteSubscriber Builds up the routes of all views. Namespace Drupal\views\EventSubscriber Code public function reset() { $this->viewsDisplayPairs = NULL; }

RouteSubscriber::getViewsDisplayIDsWithRoute

protected RouteSubscriber::getViewsDisplayIDsWithRoute() Gets all the views and display IDs using a route. File core/modules/views/src/EventSubscriber/RouteSubscriber.php, line 90 Class RouteSubscriber Builds up the routes of all views. Namespace Drupal\views\EventSubscriber Code protected function getViewsDisplayIDsWithRoute() { if (!isset($this->viewsDisplayPairs)) { $this->viewsDisplayPairs = array(); // @todo Convert this method to some service. $views = $this-

RouteSubscriber::getSubscribedEvents

public static RouteSubscriber::getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) arra

RouteSubscriber::getSubscribedEvents

public static RouteSubscriber::getSubscribedEvents() Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 if unset For instance: array('eventName' => 'methodName') array('eventName' => array('methodName', $priority)) arra