You are here

public function FacebookCommentsSettingsForm::submitForm in Facebook Comments Social Plugin 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/FacebookCommentsSettingsForm.php, line 62
Contains \Drupal\facebook_comments\Form\FacebookCommentsSettingsForm

Class

FacebookCommentsSettingsForm

Namespace

Drupal\facebook_comments\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('facebook_comments.settings')
    ->set('facebook_comments_appid', $form_state
    ->getValue('facebook_comments_appid'))
    ->set('facebook_comments_admins', $form_state
    ->getValue('facebook_comments_admins'))
    ->set('facebook_comments_ssl', $form_state
    ->getValue('facebook_comments_ssl'))
    ->save();
  parent::submitForm($form, $form_state);
}