You are here

private function SiteSettingReplicateForm::finalSubmit in Site Settings and Labels 8

Handle submit.

1 call to SiteSettingReplicateForm::finalSubmit()
SiteSettingReplicateForm::submitForm in src/Form/SiteSettingReplicateForm.php
Form submission handler.

File

src/Form/SiteSettingReplicateForm.php, line 256

Class

SiteSettingReplicateForm
Class SiteSettingReplicateForm.

Namespace

Drupal\site_settings\Form

Code

private function finalSubmit(array &$form, FormStateInterface $form_state) {

  // Path to the batch processing.
  $path = drupal_get_path('module', 'site_settings');
  $path .= '/src/SiteSettingsReplicateBatches.php';

  // Information to pass to the batch processing.
  $settings = [
    'values' => $form_state
      ->getValues(),
  ];
  $batch = [
    'title' => $this
      ->t('Exporting'),
    'operations' => [
      [
        '_site_settings_replicate_process_batch',
        [
          $settings,
        ],
      ],
    ],
    'finished' => '_site_settings_replicate_finish_batch',
    'file' => $path,
  ];
  batch_set($batch);
}