# This is the router item for listing all migration group entities.
entity.migration_group.list:
  path: '/admin/structure/migrate'
  defaults:
    _entity_list: 'migration_group'
    _title: 'Migrations'
  requirements:
    _permission: 'administer migrations'

# This is the router item for adding our migration group entity.
entity.migration_group.add_form:
  path: '/admin/structure/migrate/add'
  defaults:
    _title: 'Add migration group'
    _entity_form: migration_group.add
  requirements:
    _entity_create_access: migration_group

# This is the router item for editing our migration group entity.
entity.migration_group.edit_form:
  path: '/admin/structure/migrate/manage/{migration_group}'
  defaults:
    _title: 'Edit migration group'
    _entity_form: migration_group.edit
  requirements:
    _entity_access: migration_group.update

# This is the router item for deleting an instance of our migration group entity.
entity.migration_group.delete_form:
  path: '/admin/structure/migrate/manage/{migration_group}/delete'
  defaults:
    _title: 'Delete migration group'
    _entity_form: migration_group.delete
  requirements:
    _entity_access: migration_group.delete

# This is the router item for listing all migration entities.
entity.migration.list:
  path: '/admin/structure/migrate/manage/{migration_group}/migrations'
  defaults:
    _entity_list: 'migration'
    _title: 'Migrations'
  requirements:
    _permission: 'administer migrations'

# This is the router item for adding our migration entity.
entity.migration.add_form:
  path: '/admin/structure/migrate/manage/{migration_group}/migrations/add'
  defaults:
    _title: 'Add migration'
    _entity_form: migration.add
  requirements:
    _entity_create_access: migration

# This is the router item for editing our migration entity.
entity.migration.edit_form:
  path: '/admin/structure/migrate/manage/{migration_group}/migrations/{migration}'
  defaults:
    _title: 'Edit migration'
    _entity_form: migration.edit
  requirements:
    _entity_access: migration.update

# This is the router item for deleting an instance of our migration entity.
entity.migration.delete_form:
  path: '/admin/structure/migrate/manage/{migration_group}/migrations/{migration}/delete'
  defaults:
    _title: 'Delete migration'
    _entity_form: migration.delete
  requirements:
    _entity_access: migration.delete

migrate_tools.messages:
  path: '/admin/structure/migrate/manage/{migration_group}/migrations/{migration}/messages'
  defaults:
    _controller: '\Drupal\migrate_tools\Controller\MessageController::overview'
    _title: 'Messages'
  requirements:
    _permission: 'administer migrations'
