class AccessDeniedHandler implements AccessDeniedHandlerInterface (View source)

This is used by the ExceptionListener to translate an AccessDeniedException to a Response object.

Properties

protected $logger
protected $urlGenerator

Methods

__construct(UrlGeneratorInterface $urlGenerator, LoggerInterface $logger)

No description

Response
handle(Request $request, AccessDeniedException $accessDeniedException)

Handles an access denied failure redirecting to home page

Details

__construct(UrlGeneratorInterface $urlGenerator, LoggerInterface $logger)

Parameters

UrlGeneratorInterface $urlGenerator
LoggerInterface $logger

Response handle(Request $request, AccessDeniedException $accessDeniedException)

Handles an access denied failure redirecting to home page

Parameters

Request $request
AccessDeniedException $accessDeniedException

Return Value

Response may return null