public function ContentRoute::buildPath in Drupal 7 to 8/9 Module Upgrader 8
Builds the Drupal 8 path for the route.
The path should be prefixed by a slash, and contain {slugs} corresponding to parameters of the callback method which can accept input from the path. Parameters are matched to slugs by name and type hint.
Return value
\Drupal\drupalmoduleupgrader\Utility\Path\PathUtilityInterface
Overrides RouteConverterInterface::buildPath
File
- src/
Plugin/ DMU/ Routing/ ContentRoute.php, line 78
Class
- ContentRoute
- Plugin annotation @Converter( id = "default", description = @Translation("Converts a menu item to a _controller route."), dependencies = { "router.route_provider", "plugin.manager.drupalmoduleupgrader.rewriter" } )
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\RoutingCode
public function buildPath(TargetInterface $target, Drupal7Route $route) {
// The parameter map modifies the path in-place, so we'll clone it in order
// to keep this method non-destructive.
$path = clone $route
->getPath();
$this
->buildParameterMap($target, $route)
->applyPath($path);
return $path;
}