code: 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;
      }
docs: Get the current Backend referrer URL.
  
  @param Request $request   The request.
  @param string  $table     The table name.
  @param bool    $encodeAmp Flag to encode ampersands or not.
  
  @return string