You are here

public function RuleScheduler::summary in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Condition/RuleScheduler.php \Drupal\rng\Plugin\Condition\RuleScheduler::summary()
  2. 3.x src/Plugin/Condition/RuleScheduler.php \Drupal\rng\Plugin\Condition\RuleScheduler::summary()

Provides a human readable summary of the condition's configuration.

Overrides CurrentTime::summary

File

src/Plugin/Condition/RuleScheduler.php, line 158

Class

RuleScheduler
Schedules rule execution based on the configured date.

Namespace

Drupal\rng\Plugin\Condition

Code

public function summary() {
  $rule_scheduler = $this
    ->getRuleScheduler();
  if ($rule_scheduler) {
    return $this
      ->t('Current date is after @date', [
      '@date' => DrupalDateTime::createFromTimestamp($rule_scheduler
        ->getDate()),
    ]);
  }
  else {
    return $this
      ->t('Current date is after a date');
  }
}