You are here

function job_scheduler_queue_info in Job Scheduler 8.2

Same name and namespace in other branches
  1. 8.3 job_scheduler.module \job_scheduler_queue_info()

Collects and returns scheduler queue info.

Parameters

string $name: (optional) Name of the schedule. Defaults to null.

Return value

array Information for the schedule queue if $name, all the information if not.

See also

hook_cron_job_scheduler_queue_info()

1 call to job_scheduler_queue_info()
JobSchedulerQueueWorker::getDerivativeDefinitions in src/Plugin/Derivative/JobSchedulerQueueWorker.php
Gets the definition of all derivatives of a base plugin.

File

./job_scheduler.module, line 45
Job scheduler module.

Code

function job_scheduler_queue_info($name = NULL) {
  $info =& drupal_static(__FUNCTION__);
  if (!$info) {
    $module_handler = \Drupal::moduleHandler();
    $info = $module_handler
      ->invokeAll('cron_job_scheduler_queue_info');
    $module_handler
      ->alter('cron_job_scheduler_queue_info', $info);
  }
  if ($name) {
    return isset($info[$name]) ? $info[$name] : NULL;
  }
  else {
    return $info;
  }
}