You are here

public function YamlFormAdminThirdPartySettingsForm::submitForm in YAML Form 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/YamlFormAdminThirdPartySettingsForm.php, line 71

Class

YamlFormAdminThirdPartySettingsForm
Configure form third party settings for this site.

Namespace

Drupal\yamlform\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('yamlform.settings');
  $third_party_settings = $form_state
    ->getValue('third_party_settings') + ($config
    ->get('third_party_settings') ?: []);
  $config
    ->set('third_party_settings', $third_party_settings);
  $config
    ->save();
  parent::submitForm($form, $form_state);
}