You are here

public function ExampleConfigEntityTwoForm::submitForm in Chaos Tool Suite (ctools) 8.3

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

tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityTwoForm.php, line 39

Class

ExampleConfigEntityTwoForm
Simple wizard step form.

Namespace

Drupal\ctools_wizard_test\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $cached_values = $form_state
    ->getTemporaryValue('wizard');

  /** @var $page \Drupal\ctools_wizard_test\Entity\ExampleConfigEntity */
  $config_entity = $cached_values['ctools_wizard_test_config_entity'];
  $config_entity
    ->set('two', $form_state
    ->getValue('two'));
}