private function returnBack()
{
$currentUrl = $this->request->getUrl();
$refererUrl = $this->request->getReferer();
if ($refererUrl === NULL) {
throw new \RuntimeException('Unable to redirect back because your browser did not send referrer');
} elseif ($refererUrl->isEqual($currentUrl)) {
throw new \RuntimeException('Unable to redirect back because it would create loop');
}
header('Location: ' . $refererUrl);
exit;
}