You are here

public function ChartsConfigForm::submitForm in Charts 8

Same name and namespace in other branches
  1. 8.4 src/Form/ChartsConfigForm.php \Drupal\charts\Form\ChartsConfigForm::submitForm()
  2. 8.3 src/Form/ChartsConfigForm.php \Drupal\charts\Form\ChartsConfigForm::submitForm()
  3. 5.0.x src/Form/ChartsConfigForm.php \Drupal\charts\Form\ChartsConfigForm::submitForm()

Parameters

array $form:

\Drupal\Core\Form\FormStateInterface $form_state:

Overrides ConfigFormBase::submitForm

File

src/Form/ChartsConfigForm.php, line 512

Class

ChartsConfigForm

Namespace

Drupal\charts\Form

Code

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