public function SocialAddToCalendarSettingsForm::submitForm in Open Social 8.9
Same name and namespace in other branches
- 10.3.x modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php \Drupal\social_event_addtocal\Form\SocialAddToCalendarSettingsForm::submitForm()
- 10.0.x modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php \Drupal\social_event_addtocal\Form\SocialAddToCalendarSettingsForm::submitForm()
- 10.1.x modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php \Drupal\social_event_addtocal\Form\SocialAddToCalendarSettingsForm::submitForm()
- 10.2.x modules/social_features/social_event/modules/social_event_addtocal/src/Form/SocialAddToCalendarSettingsForm.php \Drupal\social_event_addtocal\Form\SocialAddToCalendarSettingsForm::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/
social_features/ social_event/ modules/ social_event_addtocal/ src/ Form/ SocialAddToCalendarSettingsForm.php, line 104
Class
- SocialAddToCalendarSettingsForm
- Class SocialAddToCalendarSettingsForm.
Namespace
Drupal\social_event_addtocal\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('social_event_addtocal.settings')
->set('enable_add_to_calendar', $form_state
->getValue('enable_add_to_calendar'))
->set('allowed_calendars', $form_state
->getValue('allowed_calendars'))
->save();
}