You are here

public function TeamInvitationForm::submitForm in Apigee Edge 8

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/apigee_edge_teams/src/Form/TeamInvitationForm.php, line 120

Class

TeamInvitationForm
Provides settings form for team_invitation..

Namespace

Drupal\apigee_edge_teams\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('apigee_edge_teams.team_settings')
    ->set('team_invitation_expiry_days', $form_state
    ->getValue([
    'team_invitation_expiry_days',
  ]))
    ->set('team_invitation_email_existing.subject', $form_state
    ->getValue([
    'team_invitation_email_existing_subject',
  ]))
    ->set('team_invitation_email_existing.body', $form_state
    ->getValue([
    'team_invitation_email_existing_body',
  ]))
    ->set('team_invitation_email_new.subject', $form_state
    ->getValue([
    'team_invitation_email_new_subject',
  ]))
    ->set('team_invitation_email_new.body', $form_state
    ->getValue([
    'team_invitation_email_new_body',
  ]))
    ->save();
  parent::submitForm($form, $form_state);
}