You are here

public function BetterRevisionsAdminForm::submitForm in Better Revisions 8

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/BetterRevisionsAdminForm.php, line 85

Class

BetterRevisionsAdminForm
Administration form for Better Revisions module.

Namespace

Drupal\better_revisions\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('better_revisions.settings')
    ->set('br_require', $form_state
    ->getValue('br_require'))
    ->set('br_list_title', $form_state
    ->getValue('br_list_title'))
    ->set('br_list_options', $form_state
    ->getValue('br_list_options'))
    ->set('br_list_help', $form_state
    ->getValue('br_list_help'))
    ->set('br_add_txt', $form_state
    ->getValue('br_add_txt'))
    ->set('br_area_title', $form_state
    ->getValue('br_area_title'))
    ->save();
}