automated_cron_settings_submit

automated_cron_settings_submit(array $form, FormStateInterface $form_state)

Form submission handler for system_cron_settings().

File

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

Code

1
2
3
4
5
6
function automated_cron_settings_submit(array $form, FormStateInterface $form_state) {
  \Drupal::configFactory()->getEditable('automated_cron.settings')
    ->set('interval', $form_state->getValue('interval'))
    ->save();
  drupal_set_message(t('The configuration options have been saved.'));
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.