You are here

function tmgmt_redirect_queue_destination in Translation Management Tool 8

Returns the redirect queue destination.

This is the final destination after all queue items have been processed.

Parameters

$destination: The default destination that should be returned if none exists.

Return value

The stored destination if defined, otherwise the passed in default destination.

Deprecated

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

1 call to tmgmt_redirect_queue_destination()
tmgmt_translation_review_form_update_state in ./tmgmt.module
Callback for the action at the job item review form.

File

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

Code

function tmgmt_redirect_queue_destination($destination = NULL) {
  if (!empty($_SESSION['tmgmt']['destination'])) {
    $destination = $_SESSION['tmgmt']['destination'];
    unset($_SESSION['tmgmt']['destination']);
    return $destination;
  }
  return $destination;
}