You are here

public function TwitterAuthSettingsForm::submitForm in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  2. 8 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  3. 8.2 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  4. 8.3 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  5. 8.4 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  6. 8.5 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  7. 8.6 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::submitForm()
  8. 8.7 modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php \Drupal\social_auth_twitter\Form\TwitterAuthSettingsForm::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

modules/custom/social_auth_twitter/src/Form/TwitterAuthSettingsForm.php, line 68

Class

TwitterAuthSettingsForm
Settings form for Social Auth Twitter.

Namespace

Drupal\social_auth_twitter\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('social_auth_twitter.settings')
    ->set('consumer_key', $values['consumer_key'])
    ->set('consumer_secret', $values['consumer_secret'])
    ->set('status', $values['status'])
    ->save();
  parent::submitForm($form, $form_state);
}