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)

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.

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)

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 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

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.2/Symfony/Component/Security/Http/Logout/LogoutUrlGenerator.html