Returns all continuous jobs with the given language.
string $source_langcode: Source language.
array Array of continuous jobs.
public function getContinuousJobs($source_langcode) {
$jobs = array();
$ids = $this->entityTypeManager
->getStorage('tmgmt_job')
->getQuery()
->accessCheck(TRUE)
->condition('source_language', $source_langcode)
->condition('job_type', Job::TYPE_CONTINUOUS)
->condition('state', Job::STATE_CONTINUOUS)
->execute();
if (!empty($ids)) {
$jobs = Job::loadMultiple($ids);
}
return $jobs;
}