PostLoginLocation
class PostLoginLocation (View source)
Class to handle the URL to redirect users to upon login.
Constants
POSTLOGIN_SESSION_KEY |
The session key to be used to store the post-login URL. |
Properties
protected Repository | $config | ||
protected Session | $session | ||
protected ResolverManagerInterface | $resolverManager | ||
protected ResponseFactoryInterface | $responseFactory | ||
protected Numbers | $valn | ||
protected Service | $siteService |
Methods
Initialize the instance.
Clear the post-login data saved in session.
Store in the session the post-login URL or page.
Get the post-login URL as stored in the session.
Get the default post-login URL.
Get the fallback post-login URL (called when all other methods fail).
Get the post-login URL.
Create a Response that redirects the user to the configured URL.
Details
__construct(Repository $config, Session $session, ResolverManagerInterface $resolverManager, ResponseFactoryInterface $responseFactory, Numbers $valn, Service $siteService)
Initialize the instance.
resetSessionPostLoginUrl()
Clear the post-login data saved in session.
setSessionPostLoginUrl(string|URLInterface|Page|int $url)
Store in the session the post-login URL or page.
string
getSessionPostLoginUrl(bool $resetSessionPostLoginUrl = false)
Get the post-login URL as stored in the session.
string
getDefaultPostLoginUrl()
Get the default post-login URL.
string
getFallbackPostLoginUrl()
Get the fallback post-login URL (called when all other methods fail).
string
getPostLoginUrl(bool $resetSessionPostLoginUrl = false)
Get the post-login URL.
Response
getPostLoginRedirectResponse(bool $resetSessionPostLoginUrl = false)
Create a Response that redirects the user to the configured URL.