You are here

protected function MigrationListBuilder::addGroupParameter in Migrate Tools 8.5

Same name and namespace in other branches
  1. 8 src/Controller/MigrationListBuilder.php \Drupal\migrate_tools\Controller\MigrationListBuilder::addGroupParameter()
  2. 8.2 src/Controller/MigrationListBuilder.php \Drupal\migrate_tools\Controller\MigrationListBuilder::addGroupParameter()
  3. 8.3 src/Controller/MigrationListBuilder.php \Drupal\migrate_tools\Controller\MigrationListBuilder::addGroupParameter()
  4. 8.4 src/Controller/MigrationListBuilder.php \Drupal\migrate_tools\Controller\MigrationListBuilder::addGroupParameter()

Add group route parameter.

Parameters

\Drupal\Core\Url $url: The URL associated with an operation.

string $migration_group: The migration's parent group.

File

src/Controller/MigrationListBuilder.php, line 244

Class

MigrationListBuilder
Provides a listing of migration entities in a given group.

Namespace

Drupal\migrate_tools\Controller

Code

protected function addGroupParameter(Url $url, $migration_group) {
  if (!$migration_group) {
    $migration_group = 'default';
  }
  $route_parameters = $url
    ->getRouteParameters() + [
    'migration_group' => $migration_group,
  ];
  $url
    ->setRouteParameters($route_parameters);
}