You are here

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

Class

AppCallbackUrlSettingsForm
Provides configuration form for app callback settings.

Namespace

Drupal\apigee_edge\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('apigee_edge.common_app_settings')
    ->set('callback_url_pattern', $form_state
    ->getValue([
    'callback_url',
    'pattern',
  ]))
    ->set('callback_url_pattern_error_message', $form_state
    ->getValue([
    'callback_url',
    'pattern_error_message',
  ]))
    ->set('callback_url_description', $form_state
    ->getValue([
    'callback_url',
    'description',
  ]))
    ->set('callback_url_placeholder', $form_state
    ->getValue([
    'callback_url',
    'placeholder',
  ]))
    ->save();

  // Clear all caches - especially app callback url field's configuration.
  drupal_flush_all_caches();
  parent::submitForm($form, $form_state);
}