You are here

public function DatabaseQueue::getItems in Queue UI 8.2

Parameters

$queue_name:

Return value

mixed

Overrides QueueUIBase::getItems

File

src/Plugin/QueueUI/DatabaseQueue.php, line 76

Class

DatabaseQueue
Defines the default Drupal Queue UI backend

Namespace

Drupal\queue_ui\Plugin\QueueUI

Code

public function getItems($queue_name) {
  $query = $this->database
    ->select('queue', 'q');
  $query
    ->addField('q', 'item_id');
  $query
    ->addField('q', 'expire');
  $query
    ->addField('q', 'created');
  $query
    ->condition('q.name', $queue_name);
  $query = $query
    ->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender');
  $query = $query
    ->limit(25);
  return $query
    ->execute();
}