You are here

public function DeveloperSettingsForm::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

src/Form/DeveloperSettingsForm.php, line 193

Class

DeveloperSettingsForm
Provides a form for changing Developer related settings.

Namespace

Drupal\apigee_edge\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->configFactory
    ->getEditable('apigee_edge.developer_settings')
    ->set('verification_action', $form_state
    ->getValue('verification_action'))
    ->set('display_only_error_message_content.value', $form_state
    ->getValue([
    'display_only_error_message_content',
    'value',
  ]))
    ->set('display_only_error_message_content.format', $form_state
    ->getValue([
    'display_only_error_message_content',
    'format',
  ]))
    ->set('verify_email_error_message.value', $form_state
    ->getValue([
    'verify_email_error_message',
    'value',
  ]))
    ->set('verify_email_error_message.format', $form_state
    ->getValue([
    'verify_email_error_message',
    'format',
  ]))
    ->set('verification_email.subject', $form_state
    ->getValue([
    'verification_email_subject',
  ]))
    ->set('verification_email.body', $form_state
    ->getValue([
    'verification_email_body',
  ]))
    ->set('verification_token', $form_state
    ->getValue([
    'verification_token',
  ]))
    ->set('verification_token_expires', $form_state
    ->getValue([
    'verification_token_expires',
  ]))
    ->set('user_edit_error_message.value', $form_state
    ->getValue([
    'user_edit_error_message',
    'value',
  ]))
    ->set('user_edit_error_message.format', $form_state
    ->getValue([
    'user_edit_error_message',
    'format',
  ]))
    ->save();
  parent::submitForm($form, $form_state);
}