You are here

public function DatabaseQueue::createQueue in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Queue/DatabaseQueue.php \Drupal\Core\Queue\DatabaseQueue::createQueue()

Creates a queue.

Called during installation and should be used to perform any necessary initialization operations. This should not be confused with the constructor for these objects, which is called every time an object is instantiated to operate on a queue. This operation is only needed the first time a given queue is going to be initialized (for example, to make a new database table or directory to hold tasks for the queue -- it depends on the queue implementation if this is necessary at all).

Overrides QueueInterface::createQueue

File

core/lib/Drupal/Core/Queue/DatabaseQueue.php, line 132
Contains \Drupal\Core\Queue\DatabaseQueue.

Class

DatabaseQueue
Default queue implementation.

Namespace

Drupal\Core\Queue

Code

public function createQueue() {

  // All tasks are stored in a single database table (which is created when
  // Drupal is first installed) so there is nothing we need to do to create
  // a new queue.
}