You are here

public function ExportForm::submitForm in Term CSV Export Import 8.3

Same name and namespace in other branches
  1. 8 src/Form/ExportForm.php \Drupal\term_csv_export_import\Form\ExportForm::submitForm()
  2. 8.2 src/Form/ExportForm.php \Drupal\term_csv_export_import\Form\ExportForm::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/ExportForm.php, line 103

Class

ExportForm
Class ExportForm.

Namespace

Drupal\term_csv_export_import\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->step++;
  $export = new ExportController($this->container
    ->get('entity_type.manager')
    ->getStorage('taxonomy_term'), $form_state
    ->getValue('vocabulary'));
  $this->getExport = $export
    ->execute($form_state
    ->getValue('include_ids'), $form_state
    ->getValue('include_headers'), $form_state
    ->getValue('include_additional_fields'));
  $form_state
    ->setRebuild();
}