Returns the redirect queue destination.
This is the final destination after all queue items have been processed.
$destination: The default destination that should be returned if none exists.
The stored destination if defined, otherwise the passed in default destination.
Deprecated in 8.x-1.x, use \Drupal\tmgmt\JobQueue::getDestination() instead.
function tmgmt_redirect_queue_destination($destination = NULL) {
if (!empty($_SESSION['tmgmt']['destination'])) {
$destination = $_SESSION['tmgmt']['destination'];
unset($_SESSION['tmgmt']['destination']);
return $destination;
}
return $destination;
}