You are here

public function EloquaSettingsForm::submitForm in Eloqua 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/EloquaSettingsForm.php, line 193
Contains \Drupal\eloqua\Form\EloquaSettingsForm.

Class

EloquaSettingsForm
Configure Eloqua settings for this site.

Namespace

Drupal\Eloqua\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this->requestPath
    ->submitConfigurationForm($form, $form_state);
  $this->userRole
    ->submitConfigurationForm($form, $form_state);
  $this
    ->config('eloqua.settings')
    ->set('site_identifier', Html::escape($form_state
    ->getValue('site_identifier')))
    ->set('request_path', $this->requestPath
    ->getConfiguration())
    ->set('user_role', $this->userRole
    ->getConfiguration())
    ->save();
  parent::submitForm($form, $form_state);
}