LogoutUrlGenerator
class LogoutUrlGenerator
Provides generator functions for the logout URL.
Methods
__construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) | ||
registerListener(string $key, string $logoutPath, string $csrfTokenId, string $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null, string $context = null) Registers a firewall's LogoutListener, allowing its URL to be generated. | ||
string | getLogoutPath(string|null $key = null) Generates the absolute logout path for the firewall. | |
string | getLogoutUrl(string|null $key = null) Generates the absolute logout URL for the firewall. | |
setCurrentFirewall(string|null $key, string|null $context = null) |
Details
__construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null)
Parameters
RequestStack | $requestStack | |
UrlGeneratorInterface | $router | |
TokenStorageInterface | $tokenStorage |
registerListener(string $key, string $logoutPath, string $csrfTokenId, string $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null, string $context = null)
Registers a firewall's LogoutListener, allowing its URL to be generated.
Parameters
string | $key | The firewall key |
string | $logoutPath | The path that starts the logout process |
string | $csrfTokenId | The ID of the CSRF token |
string | $csrfParameter | The CSRF token parameter name |
CsrfTokenManagerInterface | $csrfTokenManager | A CsrfTokenManagerInterface instance |
string | $context | The listener context |
string getLogoutPath(string|null $key = null)
Generates the absolute logout path for the firewall.
Parameters
string|null | $key | The firewall key or null to use the current firewall key |
Return Value
string | The logout path |
string getLogoutUrl(string|null $key = null)
Generates the absolute logout URL for the firewall.
Parameters
string|null | $key | The firewall key or null to use the current firewall key |
Return Value
string | The logout URL |
setCurrentFirewall(string|null $key, string|null $context = null)
Parameters
string|null | $key | The current firewall key |
string|null | $context | The current firewall context |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.html