You are here

public function MigrateUpgradeForm::submitOverviewForm in Migrate Upgrade 8

Form submission handler for the overview form.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

File

src/Form/MigrateUpgradeForm.php, line 772
Contains \Drupal\migrate_upgrade\Form\MigrateUpgradeForm.

Class

MigrateUpgradeForm
Defines a multi-step form for performing direct site upgrades.

Namespace

Drupal\migrate_upgrade\Form

Code

public function submitOverviewForm(array &$form, FormStateInterface $form_state) {
  switch ($form_state
    ->getValue('upgrade_option')) {
    case static::MIGRATE_UPGRADE_INCREMENTAL:
      $form_state
        ->setValue('step', 'confirm');
      break;
    case static::MIGRATE_UPGRADE_ROLLBACK:
      $form_state
        ->setValue('step', 'confirm');
      break;
    default:
      $form_state
        ->setValue('step', 'credentials');
      break;
  }
  $form_state
    ->setRebuild();
}