You are here

public function AmountFormattingForm::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 ConfigFormBase::submitForm

File

src/Form/AmountFormattingForm.php, line 99

Class

AmountFormattingForm
Configures amount formatting.

Namespace

Drupal\currency\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $config = $this
    ->config('currency.amount_formatting');
  $config
    ->set('plugin_id', $values['default_plugin_id']);
  $config
    ->save();
  parent::submitForm($form, $form_state);
}