You are here

public function ParameterMap::applyPath in Drupal 7 to 8/9 Module Upgrader 8

Applies the parameter map to a path, modifying it as needed.

Parameters

\Drupal\drupalmoduleupgrader\Utility\Path\PathUtilityInterface $path: The path to modify (in-place).

1 call to ParameterMap::applyPath()
ParameterMap::applyRoute in src/Routing/ParameterMap.php
Apply the parameter map to a Drupal 8 route, modifying it as needed.

File

src/Routing/ParameterMap.php, line 121

Class

ParameterMap
Represents a set of parameter bindings for a particular path, callback, and set of arguments.

Namespace

Drupal\drupalmoduleupgrader\Routing

Code

public function applyPath(PathUtilityInterface $path) {
  foreach ($this as $key => $binding) {
    if (is_integer($key)) {
      $path[$key] = new PathComponent8x('{' . $binding
        ->getParameter()
        ->getName() . '}');
    }
  }
}