You are here

public function DashboardsSettingsForm::submitForm in Dashboards with Layout Builder 8

Same name and namespace in other branches
  1. 2.0.x src/Form/DashboardsSettingsForm.php \Drupal\dashboards\Form\DashboardsSettingsForm::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/DashboardsSettingsForm.php, line 107

Class

DashboardsSettingsForm
Class DashboardsSettingsForm.

Namespace

Drupal\dashboards\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('dashboards.settings')
    ->set('colormap', $form_state
    ->getValue('colormap'))
    ->set('alpha', $form_state
    ->getValue('alpha'))
    ->set('shades', $form_state
    ->getValue('shades'))
    ->save();
}