function CronForm::submitForm

Same name in other branches
  1. 8.9.x core/modules/system/src/Form/CronForm.php \Drupal\system\Form\CronForm::submitForm()
  2. 10 core/modules/system/src/Form/CronForm.php \Drupal\system\Form\CronForm::submitForm()
  3. 11.x core/modules/system/src/Form/CronForm.php \Drupal\system\Form\CronForm::submitForm()

Overrides FormInterface::submitForm

File

core/modules/system/src/Form/CronForm.php, line 156

Class

CronForm
Configure cron settings for this site.

Namespace

Drupal\system\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $this->config('system.cron')
        ->set('logging', $form_state->getValue('logging'))
        ->save();
    $this->messenger()
        ->addStatus($this->t('The configuration options have been saved.'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.