12345678910111213141516171819202122232425262728293031323334 |
- <?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')
- ->setFormClass('edit', 'Drupal\migrate_tools\Form\MigrationEditForm')
- ->setFormClass('delete', 'Drupal\migrate_tools\Form\MigrationDeleteForm')
- // ->setLinkTemplate('edit-form', '/admin/structure/migrate/manage/{migration_group}/migrations/{migration}')
- ->setLinkTemplate('list-form', '/admin/structure/migrate/manage/{migration_group}/migrations')
- /* ->setLinkTemplate('delete-form', '/admin/structure/migrate/manage/{migration_group}/migrations/{migration}/delete')*/;
- $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('list-form', '/admin/structure/migrate/manage/{migration_group}/migrations')*/
- ->setLinkTemplate('delete-form', '/admin/structure/migrate/manage/{migration_group}/delete');
- }
|