You are here

public function SettingsForm::submitForm in CRM Core 8.3

Same name in this branch
  1. 8.3 src/Form/SettingsForm.php \Drupal\crm_core\Form\SettingsForm::submitForm()
  2. 8.3 modules/crm_core_user_sync/src/Form/SettingsForm.php \Drupal\crm_core_user_sync\Form\SettingsForm::submitForm()

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/SettingsForm.php, line 95

Class

SettingsForm
Configure general settings.

Namespace

Drupal\crm_core\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->configFactory()
    ->getEditable('crm_core.settings');
  $config
    ->set('custom_theme', $form_state
    ->getValue('crm_core_custom_theme'))
    ->save();
  parent::submitForm($form, $form_state);
}