You are here

public function RouteWrapper::__construct in Drupal 7 to 8/9 Module Upgrader 8

Same name in this branch
  1. 8 src/Routing/Drupal7/RouteWrapper.php \Drupal\drupalmoduleupgrader\Routing\Drupal7\RouteWrapper::__construct()
  2. 8 src/Routing/Drupal8/RouteWrapper.php \Drupal\drupalmoduleupgrader\Routing\Drupal8\RouteWrapper::__construct()

Constructs a Route object.

File

src/Routing/Drupal8/RouteWrapper.php, line 49

Class

RouteWrapper
Wraps around a Symfony Route object, providing helper methods.

Namespace

Drupal\drupalmoduleupgrader\Routing\Drupal8

Code

public function __construct($name, Route $route, RouteProviderInterface $route_provider) {
  $this->name = $name;
  $this->route = $route;
  $this->routeProvider = $route_provider ? $route_provider : \Drupal::service('router.route_provider');
  $this->path = new PathUtility($route
    ->getPath());
}