You are here

public function Simple::formatLabel in Ultimate Cron 8.2

Label for schedule.

Parameters

\Drupal\ultimate_cron\Entity\CronJob $job: The job whose label should be formatted.

Overrides Crontab::formatLabel

File

src/Plugin/ultimate_cron/Scheduler/Simple.php, line 55

Class

Simple
Simple scheduler.

Namespace

Drupal\ultimate_cron\Plugin\ultimate_cron\Scheduler

Code

public function formatLabel(CronJob $job) {
  return t('Every @interval', array(
    '@interval' => \Drupal::service('date.formatter')
      ->formatInterval($this->presets[$this->configuration['rules'][0]]),
  ));
}