You are here

public function OptimizedbAdminForm::submitForm in OptimizeDB 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/OptimizedbAdminForm.php, line 90

Class

OptimizedbAdminForm
Settings optimizedb module.

Namespace

Drupal\optimizedb\Form

Code

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