KnpU\OAuth2ClientBundle\Security\Helper\PreviousUrlHelper::getPreviousUrl PHP Метод

getPreviousUrl() публичный Метод

Returns the URL (if any) the user visited that forced them to login.
public getPreviousUrl ( Request $request, string $providerKey ) : string
$request Symfony\Component\HttpFoundation\Request
$providerKey string
Результат string
    public function getPreviousUrl(Request $request, $providerKey)
    {
        // if the user hit a secure page and start() was called, this was
        // the URL they were on, and probably where you want to redirect to
        return $request->getSession()->get('_security.' . $providerKey . '.target_path');
    }
PreviousUrlHelper