You are here

public function SchedulingState::isHalted in Webform Scheduled Tasks 8.2

Check if a task has been halted.

Parameters

\Drupal\webform_scheduled_tasks\Entity\WebformScheduledTaskInterface $scheduledTask: The task.

Return value

bool TRUE if a task has been halted, FALSE otherwise.

Overrides SchedulingStateInterface::isHalted

1 call to SchedulingState::isHalted()
SchedulingState::getHaltedMessage in src/SchedulingState.php
Get the message associated with a halted task, if one exists.

File

src/SchedulingState.php, line 75

Class

SchedulingState
Get information about the state of task scheduling.

Namespace

Drupal\webform_scheduled_tasks

Code

public function isHalted(WebformScheduledTaskInterface $scheduledTask) {
  $halted_tasks = $this->state
    ->get(static::HALTED_STATE_KEY);
  return isset($halted_tasks[$scheduledTask
    ->id()]);
}