You are here

RouterBuiltEvent.php in Drupal 7 to 8/9 Module Upgrader 8

File

src/Routing/RouterBuiltEvent.php
View source
<?php

namespace Drupal\drupalmoduleupgrader\Routing;

use Symfony\Component\EventDispatcher\Event;

/**
 * Event object fired when all routes have been added to a RouterInterface
 * implementation.
 */
class RouterBuiltEvent extends Event {

  /**
   * @var \Drupal\drupalmoduleupgrader\Converter\Routing\RouterInterface
   */
  protected $router;

  /**
   * Constructs a RouterBuiltEvent object.
   */
  public function __construct(RouterInterface $router) {
    $this->router = $router;
  }

  /**
   * Returns the router object.
   *
   * @return \Drupal\drupalmoduleupgrader\Converter\Routing\RouterInterface
   */
  public function getRouter() {
    return $this->router;
  }

}

Classes

Namesort descending Description
RouterBuiltEvent Event object fired when all routes have been added to a RouterInterface implementation.