You are here

function tmgmt_redirect_queue_dequeue in Translation Management Tool 8

Dequeues one redirect in the queue and returns that.

Return value

A redirect URL or NULL if the queue is empty.

Deprecated

Deprecated in 8.x-1.x, use \Drupal\tmgmt\JobQueue::getNextJob() instead.

2 calls to tmgmt_redirect_queue_dequeue()
tmgmt_job_checkout_and_redirect in ./tmgmt.module
Attempts to checkout a number of jobs and prepare the necessary redirects.
tmgmt_translation_review_form_update_state in ./tmgmt.module
Callback for the action at the job item review form.

File

./tmgmt.module, line 924
Main module file for the Translation Management module.

Code

function tmgmt_redirect_queue_dequeue() {
  if (!empty($_SESSION['tmgmt']['redirect_queue'])) {
    return array_shift($_SESSION['tmgmt']['redirect_queue']);
  }
}