function _batch_queue

7.x _batch_queue($batch_set)
8.x _batch_queue($batch_set)

Returns a queue object for a batch set.


$batch_set: The batch set.

Return value

The queue object.

Related topics

3 calls to _batch_queue()
_batch_finished in drupal/includes/
Ends the batch processing.
_batch_populate_queue in drupal/includes/
Populates a job queue with the operations of a batch set.
_batch_process in drupal/includes/
Processes sets in a batch.


drupal/includes/, line 4657
Functions for form and batch generation and processing.


function _batch_queue($batch_set) {
  static $queues;

  // The class autoloader is not available when running update.php, so make
  // sure the files are manually included.
  if (!isset($queues)) {
    $queues = array();
    require_once DRUPAL_ROOT . '/modules/system/';
    require_once DRUPAL_ROOT . '/includes/';

  if (isset($batch_set['queue'])) {
    $name = $batch_set['queue']['name'];
    $class = $batch_set['queue']['class'];

    if (!isset($queues[$class][$name])) {
      $queues[$class][$name] = new $class($name);
    return $queues[$class][$name];