class RouteBuildEvent

Represents route building information as event.

Hierarchy

Expanded class hierarchy of RouteBuildEvent

6 files declare their use of RouteBuildEvent
AccessSubscriber.php in drupal/core/lib/Drupal/Core/EventSubscriber/AccessSubscriber.php
Contains Drupal\Core\EventSubscriber\AccessSubscriber.
DisplayPageTest.php in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayPageTest.php
Contains \Drupal\views\Tests\Plugin\DisplayPageTest.
RouteSubscriber.php in drupal/core/modules/views/lib/Drupal/views/EventSubscriber/RouteSubscriber.php
Contains \Drupal\views\EventSubscriber\RouteSubscriber.
RouteSubscriber.php in drupal/core/modules/field_ui/lib/Drupal/field_ui/Routing/RouteSubscriber.php
Contains \Drupal\field_ui\Routing\RouteSubscriber.
RouteSubscriber.php in drupal/core/modules/rest/lib/Drupal/rest/EventSubscriber/RouteSubscriber.php

... See full list

File

drupal/core/lib/Drupal/Core/Routing/RouteBuildEvent.php, line 16
Definition of Drupal\Core\Routing\RouteBuildEvent.

Namespace

Drupal\Core\Routing
View source
class RouteBuildEvent extends Event {

  /**
   * The route collection.
   *
   * @var \Symfony\Component\Routing\RouteCollection
   */
  protected $routeCollection;

  /**
   * The module name that provides the route.
   *
   * @var string
   */
  protected $module;

  /**
   * Constructs a RouteBuildEvent object.
   */
  public function __construct(RouteCollection $route_collection, $module) {
    $this->routeCollection = $route_collection;
    $this->module = $module;
  }

  /**
   * Gets the route collection.
   */
  public function getRouteCollection() {
    return $this->routeCollection;
  }

  /**
   * Gets the module that provides the route.
   */
  public function getModule() {
    return $this->module;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Event::$dispatcher private property
Event::$name private property
Event::$propagationStopped private property
Event::getDispatcher public function Returns the EventDispatcher that dispatches this Event
Event::getName public function Gets the event's name.
Event::isPropagationStopped public function Returns whether further event listeners should be triggered.
Event::setDispatcher public function Stores the EventDispatcher that dispatches this Event
Event::setName public function Sets the event's name property.
Event::stopPropagation public function Stops the propagation of the event to further event listeners.
RouteBuildEvent::$module protected property The module name that provides the route.
RouteBuildEvent::$routeCollection protected property The route collection.
RouteBuildEvent::getModule public function Gets the module that provides the route.
RouteBuildEvent::getRouteCollection public function Gets the route collection.
RouteBuildEvent::__construct public function Constructs a RouteBuildEvent object.