public function ContinuousManager::getContinuousJobs in Translation Management Tool 8
Returns all continuous jobs with the given language.
Parameters
string $source_langcode: Source language.
Return value
array Array of continuous jobs.
File
- src/
ContinuousManager.php, line 95
Class
- ContinuousManager
- A service manager for continuous jobs.
Namespace
Drupal\tmgmtCode
public function getContinuousJobs($source_langcode) {
$jobs = array();
$ids = $this->entityTypeManager
->getStorage('tmgmt_job')
->getQuery()
->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;
}