public function ReviewForm::submitForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/migrate_drupal_ui/src/Form/ReviewForm.php \Drupal\migrate_drupal_ui\Form\ReviewForm::submitForm()
- 10 core/modules/migrate_drupal_ui/src/Form/ReviewForm.php \Drupal\migrate_drupal_ui\Form\ReviewForm::submitForm()
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
- core/
modules/ migrate_drupal_ui/ src/ Form/ ReviewForm.php, line 229
Class
- ReviewForm
- Migrate Upgrade review form.
Namespace
Drupal\migrate_drupal_ui\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config['source_base_path'] = $this->store
->get('source_base_path');
$batch = [
'title' => $this
->t('Running upgrade'),
'progress_message' => '',
'operations' => [
[
[
MigrateUpgradeImportBatch::class,
'run',
],
[
array_keys($this->migrations),
$config,
],
],
],
'finished' => [
MigrateUpgradeImportBatch::class,
'finished',
],
];
batch_set($batch);
$form_state
->setRedirect('<front>');
$this->store
->set('step', 'overview');
$this->state
->set('migrate_drupal_ui.performed', REQUEST_TIME);
}