You are here

public function ReadingTimeConfigForm::submitForm in Node read time 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/ReadingTimeConfigForm.php, line 108

Class

ReadingTimeConfigForm
Defines a form for enabling reading time field for specific content types.

Namespace

Drupal\node_read_time\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $config = $this
    ->config('node_read_time.settings');
  $config
    ->set('reading_time', $form_state
    ->getValues());
  $config
    ->save();
}