You are here

public function CronJob::getSignal in Ultimate Cron 8.2

Get a signal and clear it if found.

Overrides CronJobInterface::getSignal

See also

UltimateCronSignal::get()

File

src/Entity/CronJob.php, line 214

Class

CronJob
Class for handling cron jobs.

Namespace

Drupal\ultimate_cron\Entity

Code

public function getSignal($signal) {
  if (isset(self::$signals[$this
    ->id()][$signal])) {
    unset(self::$signals[$this
      ->id()][$signal]);
    return TRUE;
  }
  $service = \Drupal::service('ultimate_cron.signal');
  return $service
    ->get($this
    ->id(), $signal);
}