You are here

public function LayouterForm::submitForm in Layouter - WYSIWYG layout templates 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 FormInterface::submitForm

File

src/Form/LayouterForm.php, line 112

Class

LayouterForm
Provides multistep ajax form for an layout choice.

Namespace

Drupal\layouter\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $step = $form_state
    ->get('step');
  if ($step < $this->steps) {
    $form_state
      ->setRebuild();
    if ($step == 1) {
      $form_state
        ->set('type', $form_state
        ->getValue('type'));
    }
  }
  $step++;
  $form_state
    ->set('step', $step);
}