public function ImportWizard::finish in Drupal-to-Drupal data migration 8.3
Form submit handler for finalizing the wizard values.
If you need to generate an entity or save config or raw table data subsequent to your form wizard, this is the responsible method.
Parameters
array $form: Drupal form array.
\Drupal\Core\Form\FormStateInterface $form_state: The final form state of the wizard.
Overrides FormWizardBase::finish
File
- migrate_d2d_ui/
src/ Wizard/ ImportWizard.php, line 78
Class
Namespace
Drupal\migrate_d2d_ui\WizardCode
public function finish(array &$form, FormStateInterface $form_state) {
$cached_values = $form_state
->getTemporaryValue('wizard');
$generator = new DrupalMigrationGenerator($cached_values);
$generator
->createMigrations();
// Go to the dashboard for this migration group.
$form_state
->setRedirect('entity.migration.list', [
'migration_group' => $cached_values['group_id'],
]);
parent::finish($form, $form_state);
}