You are here

public function Simple::settingsLabel in Ultimate Cron 8.2

Get label for a specific setting.

Overrides CronPlugin::settingsLabel

File

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

Class

Simple
Simple scheduler.

Namespace

Drupal\ultimate_cron\Plugin\ultimate_cron\Scheduler

Code

public function settingsLabel($name, $value) {
  switch ($name) {
    case 'rules':
      return isset($value[0]) ? \Drupal::service('date.formatter')
        ->formatInterval($this->presets[$value[0]]) : $value;
  }
  return parent::settingsLabel($name, $value);
}