class RedirectController extends ContainerAware
Redirects a request to another URL.
Methods
|
setContainer(ContainerInterface $container = null)
Sets the Container. |
from ContainerAware | |
| Response |
redirectAction(Request $request, string $route, Boolean $permanent = false, Boolean|array $ignoreAttributes = false)
Redirects to another route with the given name. |
|
| Response |
urlRedirectAction(Request $request, string $path, Boolean $permanent = false, string|null $scheme = null, integer|null $httpPort = null, integer|null $httpsPort = null)
Redirects to a URL. |
Details
in ContainerAware at line 37
public
setContainer(ContainerInterface $container = null)
Sets the Container.
at line 43
public Response
redirectAction(Request $request, string $route, Boolean $permanent = false, Boolean|array $ignoreAttributes = false)
Redirects to another route with the given name.
The response status code is 302 if the permanent parameter is false (default),
and 301 if the redirection is permanent.
In case the route name is empty, the status code will be 404 when permanent is false
and 410 otherwise.
at line 79
public Response
urlRedirectAction(Request $request, string $path, Boolean $permanent = false, string|null $scheme = null, integer|null $httpPort = null, integer|null $httpsPort = null)
Redirects to a URL.
The response status code is 302 if the permanent parameter is false (default),
and 301 if the redirection is permanent.
In case the path is empty, the status code will be 404 when permanent is false
and 410 otherwise.