Document for redirection entries with the RedirectController.
Defines additional methods needed by the RedirectController to redirect based on the route.
This document may define (in order of precedence - the others can be empty):
With standard Symfony routing, you can just use uri / routeName and a hashmap of parameters.
For the dynamic router, you can return a RouteInterface instance in the field 'route' of the parameters.
Note: getRedirectContent must return the redirect route itself for the integration with DynamicRouter to work.
@author David Buchmann <david@liip.ch>
Expanded class hierarchy of RedirectRouteInterface
All classes that implement RedirectRouteInterface
interface RedirectRouteInterface extends RouteObjectInterface {
/**
* Get the absolute uri to redirect to external domains.
*
* If this is non-empty, the other methods won't be used.
*
* @return string target absolute uri
*/
public function getUri();
/**
* Get the target route document this route redirects to.
*
* If non-null, it is added as route into the parameters, which will lead
* to have the generate call issued by the RedirectController to have
* the target route in the parameters.
*
* @return RouteObjectInterface the route this redirection points to
*/
public function getRouteTarget();
/**
* Get the name of the target route for working with the symfony standard
* router.
*
* @return string target route name
*/
public function getRouteName();
/**
* Whether this should be a permanent or temporary redirect
*
* @return boolean
*/
public function isPermanent();
/**
* Get the parameters for the target route router::generate()
*
* Note that for the DynamicRouter, you return the target route
* document as field 'route' of the hashmap.
*
* @return array Information to build the route
*/
public function getParameters();
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RedirectRouteInterface:: |
public | function | Get the parameters for the target route router::generate() | |
RedirectRouteInterface:: |
public | function | Get the name of the target route for working with the symfony standard router. | |
RedirectRouteInterface:: |
public | function | Get the target route document this route redirects to. | |
RedirectRouteInterface:: |
public | function | Get the absolute uri to redirect to external domains. | |
RedirectRouteInterface:: |
public | function | Whether this should be a permanent or temporary redirect | |
RouteObjectInterface:: |
constant | Field name for the content of the current route, if any. | ||
RouteObjectInterface:: |
constant | Field name for an explicit controller name to be used with this route | ||
RouteObjectInterface:: |
public | function | Get the content document this route entry stands for. If non-null, the ControllerClassMapper uses it to identify a controller and the content is passed to the controller. | 2 |
RouteObjectInterface:: |
public | function | Get the route key. | 3 |
RouteObjectInterface:: |
constant | Field name that will hold the route name that was matched. | ||
RouteObjectInterface:: |
constant | Field name of the route object that was matched. | ||
RouteObjectInterface:: |
constant | Field name for an explicit template to be used with this route. i.e. CmfContentBundle:StaticContent:index.html.twig |