public function SourceSelectForm::submitForm in Drupal-to-Drupal data migration 8.3
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- migrate_d2d_ui/
src/ Form/ SourceSelectForm.php, line 178
Class
- SourceSelectForm
- Defines a multi-step form for performing direct site upgrades.
Namespace
Drupal\migrate_d2d_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$cached_values = $form_state
->getTemporaryValue('wizard');
$connection = $this
->getConnection($cached_values['database']);
// Store the system data in form storage.
$form_state
->set('system_data', $this
->getSystemData($connection));
$this
->createDatabaseStateSettings($cached_values['database'], $cached_values['version']);
$migration_plugins = $this
->getMigrations('', $cached_values['version']);
// Convert the migration object into an array so that it can be stored in
// form storage.
foreach ($migration_plugins as $migration) {
$cached_values['migrations'][$migration
->id()] = (string) $migration
->label();
}
$form_state
->setTemporaryValue('wizard', $cached_values);
}