You are here

public function GathercontentContentImportSelectForm::submitForm in GatherContent 8

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 GathercontentMultistepFormBase::submitForm

File

src/Form/GathercontentContentImportSelectForm.php, line 168

Class

GathercontentContentImportSelectForm
Class GathercontentContentImportSelectForm.

Namespace

Drupal\gathercontent\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->store
    ->set('project_id', $form_state
    ->getValue('project'));
  $this->store
    ->set('nodes', array_filter($form_state
    ->getValue('content')));
  $this->store
    ->set('menu', array_intersect_key(array_filter($form_state
    ->getValue('menu')), array_filter($form_state
    ->getValue('content'))));
  $form_state
    ->setRedirect('gathercontent.import_confirm_form');
}