You are here

public function EventInviteSettingsForm::submitForm in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/modules/social_event_invite/src/Form/EventInviteSettingsForm.php \Drupal\social_event_invite\Form\EventInviteSettingsForm::submitForm()
  2. 10.3.x modules/social_features/social_event/modules/social_event_invite/src/Form/EventInviteSettingsForm.php \Drupal\social_event_invite\Form\EventInviteSettingsForm::submitForm()
  3. 10.0.x modules/social_features/social_event/modules/social_event_invite/src/Form/EventInviteSettingsForm.php \Drupal\social_event_invite\Form\EventInviteSettingsForm::submitForm()
  4. 10.2.x modules/social_features/social_event/modules/social_event_invite/src/Form/EventInviteSettingsForm.php \Drupal\social_event_invite\Form\EventInviteSettingsForm::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_invite/src/Form/EventInviteSettingsForm.php, line 102

Class

EventInviteSettingsForm
Class EnrollInviteForm.

Namespace

Drupal\social_event_invite\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this->configFactory
    ->getEditable('social_event_invite.settings');
  $config
    ->set('invite_enroll', $form_state
    ->getValue('invite_enroll'));
  $config
    ->set('invite_group_types', $form_state
    ->getValue('invite_group_types'));
  $config
    ->set('invite_message', $form_state
    ->getValue('invite_message'));
  $config
    ->set('invite_subject', $form_state
    ->getValue('invite_subject'));
  $config
    ->set('invite_helper', $form_state
    ->getValue('invite_helper'));
  $config
    ->set('email_verification', $form_state
    ->getValue('email_verification'));
  $config
    ->save();
}