You are here

public function LaunchImportForm::submitForm in Content Synchronizer 3.x

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

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'));
}