You are here

public function TomeStaticCronSettingsForm::submitForm in Tome 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/tome_static/modules/tome_static_cron/src/Form/TomeStaticCronSettingsForm.php, line 60

Class

TomeStaticCronSettingsForm
Configures Tome Static Cron settings for this site.

Namespace

Drupal\tome_static_cron\Form

Code

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