You are here

public function SkypeSettingsForm::submitForm in Skype 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/SkypeSettingsForm.php, line 267

Class

SkypeSettingsForm
Class SkypeSettingsForm.

Namespace

Drupal\skype\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('skype.settings');
  $config
    ->set('enable_chat', $form_state
    ->getValue('enable_chat'));
  $config
    ->set('message_recipient', $form_state
    ->getValue('message_recipient'));
  $config
    ->set('chat_id', $form_state
    ->getValue('chat_id'));
  $config
    ->set('initiate_chat', $form_state
    ->getValue('initiate_chat'));
  $config
    ->set('button_style', $form_state
    ->getValue('button_style'));
  $config
    ->set('text_only', $form_state
    ->getValue('text_only'));
  $config
    ->set('button_text', $form_state
    ->getValue('button_text'));
  $config
    ->set('button_color', $form_state
    ->getValue('button_color'));
  $config
    ->set('chat_can_collapse', $form_state
    ->getValue('chat_can_collapse'));
  $config
    ->set('chat_can_close', $form_state
    ->getValue('chat_can_close'));
  $config
    ->set('chat_can_upload_file', $form_state
    ->getValue('chat_can_upload_file'));
  $config
    ->set('chat_enable_animation', $form_state
    ->getValue('chat_enable_animation'));
  $config
    ->set('chat_can_upload_file', $form_state
    ->getValue('chat_can_upload_file'));
  $config
    ->set('chat_enable_header', $form_state
    ->getValue('chat_enable_header'));
  $config
    ->set('exclude_mode', $form_state
    ->getValue('exclude_mode'));
  $config
    ->set('exclude_pages', $form_state
    ->getValue('exclude_pages'));
  $config
    ->save();
  parent::submitForm($form, $form_state);
}