You are here

public function LiveChatSettingsForm::submitForm in LiveChat 8

Same name and namespace in other branches
  1. 8.2 src/Form/LiveChatSettingsForm.php \Drupal\livechat\Form\LiveChatSettingsForm::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/LiveChatSettingsForm.php, line 95

Class

LiveChatSettingsForm
Configure Coffee for this site.

Namespace

Drupal\livechat\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config(LIVECHAT_CONFIGURATION_NAME)
    ->set('livechat_visibility', $values['livechat_visibility'])
    ->set('livechat_pages', $values['livechat_pages'])
    ->set('livechat_exclude_system_paths', $values['livechat_exclude_system_paths'])
    ->set('livechat_group', $values['livechat_group'])
    ->set('livechat_enabled', $values['livechat_enabled'])
    ->save();
  parent::submitForm($form, $form_state);
}