public function ContinuousManager::hasContinuousJobs in Translation Management Tool 8
Checks if there is any continuous job.
Return value
bool Returns TRUE if there is continuous job, FALSE otherwise.
File
- src/
ContinuousManager.php, line 78
Class
- ContinuousManager
- A service manager for continuous jobs.
Namespace
Drupal\tmgmtCode
public function hasContinuousJobs() {
$id = $this->entityTypeManager
->getStorage('tmgmt_job')
->getQuery()
->condition('job_type', Job::TYPE_CONTINUOUS)
->range(0, 1)
->execute();
return !empty($id);
}