Same name and namespace in other branches
  1. 8.9.x core/modules/automated_cron/automated_cron.module \automated_cron_settings_submit()
  2. 9 core/modules/automated_cron/automated_cron.module \automated_cron_settings_submit()

Form submission handler for system_cron_settings().

1 string reference to 'automated_cron_settings_submit'
automated_cron_form_system_cron_settings_alter in core/modules/automated_cron/automated_cron.module
Implements hook_form_FORM_ID_alter() for the system_cron_settings() form.

File

core/modules/automated_cron/automated_cron.module, line 57
Provides an automated cron by executing it at the end of a response.

Code

function automated_cron_settings_submit(array $form, FormStateInterface $form_state) {
  \Drupal::configFactory()
    ->getEditable('automated_cron.settings')
    ->set('interval', $form_state
    ->getValue('interval'))
    ->save();
}