You are here

public function ConnectionSettingsForm::submitForm in RedHen CRM 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

modules/redhen_connection/src/Form/ConnectionSettingsForm.php, line 42

Class

ConnectionSettingsForm
Class ConnectionSettingsForm.

Namespace

Drupal\redhen_connection\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  \Drupal::service('config.factory')
    ->getEditable('redhen_connection.settings')
    ->set('auto_disable_connections', $form_state
    ->getValue('auto_disable_connections'))
    ->save();
  parent::submitForm($form, $form_state);
}