You are here

public function SocialSettingsForm::submitForm in Opigno class 8

Same name and namespace in other branches
  1. 3.x src/Form/SocialSettingsForm.php \Drupal\opigno_class\Form\SocialSettingsForm::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/SocialSettingsForm.php, line 63

Class

SocialSettingsForm
Class Social settings.

Namespace

Drupal\opigno_class\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('opigno_class.socialsettings')
    ->set('social', (int) $form_state
    ->getValue('social'))
    ->save();
}