You are here

public function SimpleFbConnectSettingsForm::submitForm in Simple FB Connect 8.3

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

Class

SimpleFbConnectSettingsForm
Defines a form that configures Simple FB Connect settings.

Namespace

Drupal\simple_fb_connect\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('simple_fb_connect.settings')
    ->set('app_id', $values['app_id'])
    ->set('app_secret', $values['app_secret'])
    ->set('api_version', $values['api_version'])
    ->set('post_login_path', $values['post_login_path'])
    ->set('redirect_user_form', $values['redirect_user_form'])
    ->set('disable_admin_login', $values['disable_admin_login'])
    ->set('disabled_roles', $values['disabled_roles'])
    ->save();
  parent::submitForm($form, $form_state);
}