You are here

migrate_tools.module in Migrate Tools 8

Provides tools for implementing and managing migrations.

File

migrate_tools.module
View source
<?php

/**
 * @file
 * Provides tools for implementing and managing migrations.
 */

/**
 * Implements hook_entity_type_alter().
 */
function migrate_tools_entity_type_alter(array &$entity_types) {

  // Inject our UI into the general migration and migration group config entities.

  /** @var \Drupal\Core\Config\Entity\ConfigEntityType[] $entity_types */
  $entity_types['migration']
    ->set('admin_permission', 'administer migrations')
    ->setHandlerClass('list_builder', 'Drupal\\migrate_tools\\Controller\\MigrationListBuilder')
    ->setFormClass('add', 'Drupal\\migrate_tools\\Form\\MigrationAddForm')
    ->setLinkTemplate('list-form', '/admin/structure/migrate/manage/{migration_group}/migrations');
  $entity_types['migration_group']
    ->set('admin_permission', 'administer migrations')
    ->setHandlerClass('list_builder', 'Drupal\\migrate_tools\\Controller\\MigrationGroupListBuilder')
    ->setFormClass('add', 'Drupal\\migrate_tools\\Form\\MigrationGroupAddForm')
    ->setFormClass('edit', 'Drupal\\migrate_tools\\Form\\MigrationGroupEditForm')
    ->setFormClass('delete', 'Drupal\\migrate_tools\\Form\\MigrationGroupDeleteForm')
    ->setLinkTemplate('edit-form', '/admin/structure/migrate/manage/{migration_group}')
    ->setLinkTemplate('delete-form', '/admin/structure/migrate/manage/{migration_group}/delete');
}

Functions