You are here

public function StatusMessages::submitForm in Status Messages 8

Same name and namespace in other branches
  1. 8.4 src/Form/StatusMessages.php \Drupal\status_messages\Form\StatusMessages::submitForm()
  2. 8.2 src/Form/StatusMessages.php \Drupal\status_messages\Form\StatusMessages::submitForm()
  3. 8.3 src/Form/StatusMessages.php \Drupal\status_messages\Form\StatusMessages::submitForm()

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/StatusMessages.php, line 58

Class

StatusMessages
Class StatusMessages.

Namespace

Drupal\status_messages\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('status_messages.status_messages')
    ->set('time', trim($form_state
    ->getValue('time')))
    ->save();
  parent::submitForm($form, $form_state);
}