public function ContinuousManager::getContinuousJobs

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 96

Class

ContinuousManager
A service manager for continuous jobs.

Namespace

Drupal\tmgmt

Code

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;
}