You are here

public function NumberTestForm::submitForm in Commerce Core 8.2

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

modules/price/tests/modules/commerce_price_test/src/Form/NumberTestForm.php, line 40

Class

NumberTestForm

Namespace

Drupal\commerce_price_test\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->messenger()
    ->addMessage(t('The number is "@number".', [
    '@number' => $form_state
      ->getValue('number'),
  ]));
}