LogoutUrlGenerator
class LogoutUrlGenerator
Provides generator functions for the logout URL.
Methods
__construct(RequestStack $requestStack = null, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) | ||
registerListener($key, $logoutPath, $csrfTokenId, $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = 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($key, $logoutPath, $csrfTokenId, $csrfParameter, CsrfTokenManagerInterface $csrfTokenManager = null)
Registers a firewall's LogoutListener, allowing its URL to be generated.
Parameters
$key | ||
$logoutPath | ||
$csrfTokenId | ||
$csrfParameter | ||
CsrfTokenManagerInterface | $csrfTokenManager |
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/3.3/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.html