public ParamConversionEnhancer::enhance(array $defaults, Request $request)
Update the defaults based on its own data and the request.
Parameters
array $defaults the getRouteDefaults array.:
Request $request the Request instance.:
Return value
array the modified defaults. Each enhancer MUST return the $defaults but may add or remove values.
Overrides RouteEnhancerInterface::enhance
File
- core/lib/Drupal/Core/Routing/Enhancer/ParamConversionEnhancer.php, line 41
Class
- ParamConversionEnhancer
- Provides a route enhancer that handles parameter conversion.
Namespace
Drupal\Core\Routing\Enhancer
Code
public function enhance(array $defaults, Request $request) { // Just run the parameter conversion once per request. if (!isset($defaults['_raw_variables'])) { $defaults['_raw_variables'] = $this->copyRawVariables($defaults); $defaults = $this->paramConverterManager->convert($defaults); } return $defaults; }
Please login to continue.