ParamConverterManager
class ParamConverterManager implements ParamConverterManagerInterface (View source)
Manages converter services for converting request parameters to full objects.
A typical use case for this would be upcasting (converting) a node id to a node entity.
Properties
| protected array | $converters | Array of loaded converter services keyed by their ids. |
Methods
$this
addConverter(ParamConverterInterface $param_converter, string $id)
Registers a parameter converter with the manager.
getConverter($converter)
Lazy-loads converter services.
setRouteParameterConverters(RouteCollection $routes)
Saves a list of applicable converters to each route.
array
convert(array $defaults)
Invokes the registered converter for each defined parameter on a route.
Details
$this
addConverter(ParamConverterInterface $param_converter, string $id)
Registers a parameter converter with the manager.
ParamConverterInterface
getConverter($converter)
Lazy-loads converter services.
setRouteParameterConverters(RouteCollection $routes)
Saves a list of applicable converters to each route.
array
convert(array $defaults)
Invokes the registered converter for each defined parameter on a route.