protected function addOriginToTargetUrl($target)
    {
        $origin = $this->request->getFullRoute();
        $additionalQuery = '_origin=' . base64_encode($origin);
        
        $parts = parse_url($target);
        
        if ($parts === false) {
            return $target;
        }
        
        if (!isset($parts['query'])) {
            $parts['query'] = '';
        } else if ($parts['query'] !== '') {
            $parts['query'] .= '&';
        }
        
        $parts['query'] .= $additionalQuery;
        return $this->buildUrl($parts);
    }
protected function addOriginToTargetUrl($target)
    {
        $origin = $this->request->getFullRoute();
        $additionalQuery = '_origin=' . base64_encode($origin);
        
        $parts = parse_url($target);
        
        if ($parts === false) {
            return $target;
        }
        
        if (!isset($parts['query'])) {
            $parts['query'] = '';
        } else if ($parts['query'] !== '') {
            $parts['query'] .= '&';
        }
        
        $parts['query'] .= $additionalQuery;
        return $this->buildUrl($parts);
    }
protected function addOriginToTargetUrl ( $ target ) { $ origin = $ this -> request -> getFullRoute ( ) ; $ additionalQuery = '_origin=' . base64_encode ( $ origin ) ; $ parts = parse_url ( $ target ) ; if ( $ parts === false ) { return $ target ; } if ( ! isset ( $ parts [ 'query' ] ) ) { $ parts [ 'query' ] = '' ; } else if ( $ parts [ 'query' ] !== '' ) { $ parts [ 'query' ] .= '&' ; } $ parts [ 'query' ] .= $ additionalQuery ; return $ this -> buildUrl ( $ parts ) ; }
Adds the origin and returns the given target url
with the origin query parameter.

@param string $target
@return void|string
Adds the origin and returns the given target url with the origin query parameter .