You are here

public function FacebookSettingsForm::submitForm in Easy Social 8.4

Same name and namespace in other branches
  1. 8.3 src/Form/FacebookSettingsForm.php \Drupal\easy_social\Form\FacebookSettingsForm::submitForm()

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides ConfigFormBase::submitForm

File

src/Form/FacebookSettingsForm.php, line 168
Contains \Drupal\easy_social\FacebookSettingsForm.

Class

FacebookSettingsForm
Configure user settings for this site.

Namespace

Drupal\easy_social\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $config = $this
    ->config('easy_social.facebook');
  $config
    ->set('share', $form_state
    ->getValue('share'))
    ->set('send', $form_state
    ->getValue('send'))
    ->set('layout', $form_state
    ->getValue('layout'))
    ->set('width', $form_state
    ->getValue('width'))
    ->set('show_faces', $form_state
    ->getValue('show_faces'))
    ->set('font', $form_state
    ->getValue('font'))
    ->set('colorscheme', $form_state
    ->getValue('colorscheme'))
    ->set('action', $form_state
    ->getValue('action'))
    ->save();
}