You are here

public function BootstrapModalMessagesAdminForm::submitForm in Bootstrap Modal Messages 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/BootstrapModalMessagesAdminForm.php, line 202

Class

BootstrapModalMessagesAdminForm
Class BootstrapModalMessagesAdminForm.

Namespace

Drupal\bootstrap_modal_messages\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('bootstrap_modal_messages.settings')
    ->set('bootstrap_modal_messages_selector', $values['bootstrap_modal_messages_selector'])
    ->set('bootstrap_modal_messages_multiple', $values['bootstrap_modal_messages_multiple'])
    ->set('bootstrap_modal_messages_ignore_admin', $values['bootstrap_modal_messages_ignore_admin'])
    ->set('bootstrap_modal_messages_show_header', $values['bootstrap_modal_messages_show_header'])
    ->set('bootstrap_modal_messages_title', $values['bootstrap_modal_messages_title'])
    ->set('bootstrap_modal_messages_header_close', $values['bootstrap_modal_messages_header_close'])
    ->set('bootstrap_modal_messages_show_footer', $values['bootstrap_modal_messages_show_footer'])
    ->set('bootstrap_modal_messages_footer_html', $values['bootstrap_modal_messages_footer_html'])
    ->set('bootstrap_modal_messages_show_onload', $values['bootstrap_modal_messages_show_onload'])
    ->set('bootstrap_modal_messages_show_controls', $values['bootstrap_modal_messages_show_controls'])
    ->set('bootstrap_modal_messages_controls_html', $values['bootstrap_modal_messages_controls_html'])
    ->set('bootstrap_modal_messages_onload_expiration', $values['bootstrap_modal_messages_onload_expiration'])
    ->save();
  parent::submitForm($form, $form_state);
}