private function getReferer(Request $request, $table, $encodeAmp = false)
    {
        $uri = $this->systemAdapter->getReferer($encodeAmp, $table);
        // Make the location an absolute URL
        if (!preg_match('@^https?://@i', $uri)) {
            $uri = $request->getBasePath() . '/' . ltrim($uri, '/');
        }

        return $uri;
    }