You are here

public function LaunchImportForm::submitForm in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Form/LaunchImportForm.php \Drupal\content_synchronizer\Form\LaunchImportForm::submitForm()
  2. 3.x src/Form/LaunchImportForm.php \Drupal\content_synchronizer\Form\LaunchImportForm::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

src/Form/LaunchImportForm.php, line 114

Class

LaunchImportForm
Launch Import Form.

Namespace

Drupal\content_synchronizer\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $batchImport = new BatchImportProcessor();
  $batchImport
    ->import($this->import, array_intersect_key($this->import
    ->getRootsEntities(), array_flip($form_state
    ->getUserInput()['entities_to_import'])), [
    $this,
    'onBatchEnd',
  ], $form_state
    ->getValue('creationType'), $form_state
    ->getValue('updateType'));
}