Class

eZ\Bundle\EzPublishCoreBundle\EventListener\RequestEventListener

class RequestEventListener implements EventSubscriberInterface

Methods

__construct(ConfigResolverInterface $configResolver, RouterInterface $router, $defaultSiteAccess, LoggerInterface $logger = null)

static  getSubscribedEvents()

onKernelRequestForward(GetResponseEvent $event)

onKernelRequestRedirect(GetResponseEvent $event)

Checks if the request needs to be redirected and return a RedirectResponse in such case.

Details

at line 45
public __construct(ConfigResolverInterface $configResolver, RouterInterface $router, $defaultSiteAccess, LoggerInterface $logger = null)

Parameters

ConfigResolverInterface $configResolver
RouterInterface $router
$defaultSiteAccess
LoggerInterface $logger

at line 53
static public getSubscribedEvents()

at line 66
public onKernelRequestForward(GetResponseEvent $event)

Parameters

GetResponseEvent $event

at line 111
public onKernelRequestRedirect(GetResponseEvent $event)

Checks if the request needs to be redirected and return a RedirectResponse in such case.

The request attributes "needsRedirect" and "semanticPathinfo" are originally set in the UrlAliasRouter.

Note: The event propagation will be stopped to ensure that no response can be set later and override the redirection.

Parameters

GetResponseEvent $event

See also

\eZ\Publish\Core\MVC\Symfony\Routing\UrlAliasRouter