You are here

public function QueueJobOperator::getQueueJobs in Drush Queue Handling 8

Get a list of queue jobs that will use drush command.

File

src/QueueJobOperator.php, line 57

Class

QueueJobOperator
Discovery and instantiation of default queue jobs.

Namespace

Drupal\mob_queue

Code

public function getQueueJobs() {
  $queues = $this->queueManager
    ->getDefinitions();
  $exe_queues = [];
  $mob_queues = \Drupal::config('mob_queue.settings')
    ->get('mob_qinfo');
  foreach ($queues as $name => $queue) {
    if (isset($mob_queues[$name]) && $mob_queues[$name]) {
      $exe_queues[$name] = $queue;
    }
  }
  return $exe_queues;
}