You are here

public function SocialSharePrivacySettingsForm::submitForm in Share Message 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/SocialSharePrivacySettingsForm.php, line 94

Class

SocialSharePrivacySettingsForm
Defines a form that configures Social Share Privacy settings.

Namespace

Drupal\sharemessage\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('sharemessage.socialshareprivacy')
    ->set('services', $form_state
    ->getValue('services'))
    ->set('facebook_action', $form_state
    ->getValue('facebook_action'))
    ->set('disqus_shortname', $form_state
    ->getValue('disqus_shortname'))
    ->set('flattr_uid', $form_state
    ->getValue('flattr_uid'))
    ->save();
}