You are here

public function TextResizeSettingsForm::submitForm in Text Resize 8

Implements \Drupal\Core\Form\FormInterface:submitForm()

Overrides ConfigFormBase::submitForm

File

src/Form/TextResizeSettingsForm.php, line 102
Contains \Drupal\text_resize\Form\TextResizeSettingsForm.

Class

TextResizeSettingsForm
Displays the text resize settings form.

Namespace

Drupal\text_resize\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('text_resize.settings')
    ->set('text_resize_scope', $form_state
    ->getValue('text_resize_scope'))
    ->set('text_resize_minimum', $form_state
    ->getValue('text_resize_minimum'))
    ->set('text_resize_maximum', $form_state
    ->getValue('text_resize_maximum'))
    ->set('text_resize_reset_button', $form_state
    ->getValue('text_resize_reset_button'))
    ->set('text_resize_line_height_allow', $form_state
    ->getValue('text_resize_line_height_allow'))
    ->set('text_resize_line_height_min', $form_state
    ->getValue('text_resize_line_height_min'))
    ->set('text_resize_line_height_max', $form_state
    ->getValue('text_resize_line_height_max'))
    ->save();
}