$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.'));
}
/**
*/
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.'));
}
}