public function EasySocialSettingsForm::submitForm in Easy Social 8.4
Same name and namespace in other branches
- 8.3 src/Form/EasySocialSettingsForm.php \Drupal\easy_social\Form\EasySocialSettingsForm::submitForm()
Implements \Drupal\Core\Form\FormInterface::submitForm().
Overrides ConfigFormBase::submitForm
File
- src/
Form/ EasySocialSettingsForm.php, line 119 - Contains \Drupal\easy_social\Form\EasySocialSettingsForm.
Class
- EasySocialSettingsForm
- Configure Easy Social global settings for this site.
Namespace
Drupal\easy_social\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$config = $this
->config('easy_social.settings');
$config
->set('global.widgets', $form_state
->getValue('widgets'))
->set('global.async', $form_state
->getValue('async'))
->save();
}