function DatabaseQueue::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Queue/DatabaseQueue.php \Drupal\Core\Queue\DatabaseQueue::__construct()
  2. 10 core/lib/Drupal/Core/Queue/DatabaseQueue.php \Drupal\Core\Queue\DatabaseQueue::__construct()
  3. 11.x core/lib/Drupal/Core/Queue/DatabaseQueue.php \Drupal\Core\Queue\DatabaseQueue::__construct()

Constructs a \Drupal\Core\Queue\DatabaseQueue object.

Parameters

string $name: The name of the queue.

\Drupal\Core\Database\Connection $connection: The Connection object containing the key-value tables.

File

core/lib/Drupal/Core/Queue/DatabaseQueue.php, line 45

Class

DatabaseQueue
Default queue implementation.

Namespace

Drupal\Core\Queue

Code

public function __construct($name, Connection $connection) {
    $this->name = $name;
    $this->connection = $connection;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.