diff --git a/core/modules/migrate/src/Plugin/migrate/process/Route.php b/core/modules/migrate/src/Plugin/migrate/process/Route.php index 47d4809..119d380 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/Route.php +++ b/core/modules/migrate/src/Plugin/migrate/process/Route.php @@ -13,22 +13,45 @@ /** * Sets the destination route information based on the source link_path. * - * The route process plugin ... + * The route process plugin sets the destination route information based on the + * source link_path. * - * The source value is an array of two values - * - link_path: - * - options: + * The source value is an array of two values: + * - link_path: The path or URL of the route. + * - options: An array of URL options, e.g. query string, attributes, etc. * * Example: * * @code * process: - * route: + * new_route_field: + * plugin: route * source: - * - link_path - * - options + * - 'https://www.drupal.org' + * - + * attributes: + * title: Drupal * @endcode * + * This will set new_route_field to be a route with the URL + * "https://www.drupal.org" and title attribute "Drupal". + * + * Example: + * + * @code + * process: + * another_route_field: + * plugin: route + * source: + * - 'https://www.drupal.org' + * - + * query: + * destination: 'node/1' + * @endcode + * + * This will set another_route_field to be a route to the user login page + * (user/login) with a query string of "destination=node/1". + * * @see \Drupal\migrate\Plugin\MigrateProcessInterface * * @MigrateProcessPlugin(