You are here

public function CurrencyAmountElement::submitForm in Currency 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

modules/currency_test/src/CurrencyAmountElement.php, line 52

Class

CurrencyAmountElement
Provides a form to test the currency_amount element.

Namespace

Drupal\currency_test

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  \Drupal::state()
    ->set('currency_test_currency_amount_element', $values['container']['amount']);
}