interface RouteConverterInterface in Drupal 7 to 8/9 Module Upgrader 8
Defines a route converter, which converts a Drupal 7 router item to a Drupal 8 Symfony route. These plugins are NOT responsible for converting *links* (including tabs or local actions), only the actual route.
Every method in this interface takes two arguments. First, a TargetInterface representing the target module. Second, the original Drupal 7 route (i.e., hook_menu() item), wrapped in a RouteWrapperInterface.
Hierarchy
- interface \Drupal\drupalmoduleupgrader\Routing\RouteConverterInterface
Expanded class hierarchy of RouteConverterInterface
All classes that implement RouteConverterInterface
1 file declares its use of RouteConverterInterface
- ContentRoute.php in src/
Plugin/ DMU/ Routing/ ContentRoute.php
1 string reference to 'RouteConverterInterface'
File
- src/
Routing/ RouteConverterInterface.php, line 17
Namespace
Drupal\drupalmoduleupgrader\RoutingView source
interface RouteConverterInterface {
/**
* Generates the route's machine-readable name.
*
* @return string
*/
public function getName(TargetInterface $target, RouteWrapper $route);
/**
* 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 \Drupal\drupalmoduleupgrader\Utility\Path\PathUtilityInterface
*/
public function buildPath(TargetInterface $target, RouteWrapper $route);
/**
* Builds the Drupal 8 definition for the route, without making any changes
* to the original module or callback.
*
* @return Drupal8\RouteWrapper
*/
public function buildRouteDefinition(TargetInterface $target, RouteWrapper $route);
/**
* Builds the Drupal 8 route, making any needed changes to the original module
* and/or callback.
*/
public function buildRoute(TargetInterface $target, RouteWrapper $route);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RouteConverterInterface:: |
public | function | Builds the Drupal 8 path for the route. | 1 |
RouteConverterInterface:: |
public | function | Builds the Drupal 8 route, making any needed changes to the original module and/or callback. | 1 |
RouteConverterInterface:: |
public | function | Builds the Drupal 8 definition for the route, without making any changes to the original module or callback. | 1 |
RouteConverterInterface:: |
public | function | Generates the route's machine-readable name. | 1 |