You are here

public function ErrorPageSettingsForm::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/ErrorPageSettingsForm.php, line 84

Class

ErrorPageSettingsForm
Provides a form for saving the error page title and content.

Namespace

Drupal\apigee_edge\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('apigee_edge.error_page')
    ->set('error_page_title', $form_state
    ->getValue('error_page_title'))
    ->set('error_page_content.format', $form_state
    ->getValue([
    'error_page_content',
    'format',
  ]))
    ->set('error_page_content.value', $form_state
    ->getValue([
    'error_page_content',
    'value',
  ]))
    ->set('error_page_debug_messages', $form_state
    ->getValue('error_page_debug_messages'))
    ->save();
  parent::submitForm($form, $form_state);
}