summaryrefslogtreecommitdiffstats
path: root/core/modules/system/src/Form/CronForm.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/system/src/Form/CronForm.php')
-rw-r--r--core/modules/system/src/Form/CronForm.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/system/src/Form/CronForm.php b/core/modules/system/src/Form/CronForm.php
index 228dc0b..a585aa5 100644
--- a/core/modules/system/src/Form/CronForm.php
+++ b/core/modules/system/src/Form/CronForm.php
@@ -155,7 +155,7 @@ class CronForm extends FormBase {
$this->config('system.cron')
->set('logging', $form_state->getValue('logging'))
->save();
- drupal_set_message(t('The configuration options have been saved.'));
+ $this->messenger()->addStatus(t('The configuration options have been saved.'));
}
/**
@@ -163,10 +163,10 @@ class CronForm extends FormBase {
*/
public function runCron(array &$form, FormStateInterface $form_state) {
if ($this->cron->run()) {
- drupal_set_message($this->t('Cron ran successfully.'));
+ $this->messenger()->addStatus($this->t('Cron ran successfully.'));
}
else {
- drupal_set_message($this->t('Cron run failed.'), 'error');
+ $this->messenger()->addError($this->t('Cron run failed.'));
}
}