_batch_queue

_batch_queue($batch_set)

Returns a queue object for a batch set.

Parameters

$batch_set: The batch set.

Return value

The queue object.

Related topics

Batch operations
Creates and processes batch operations.

File

core/includes/form.inc, line 932
Functions for form and batch generation and processing.

Code

function _batch_queue($batch_set) {
  static $queues;

  if (!isset($queues)) {
    $queues = array();
  }

  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, \Drupal::database());
    }
    return $queues[$class][$name];
  }
}
doc_Drupal
2016-10-29 09:57:05
Comments
Leave a Comment

Please login to continue.