public function FormRouteEnhancer::enhance in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php \Drupal\Core\Routing\Enhancer\FormRouteEnhancer::enhance()
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/ FormRouteEnhancer.php, line 28 - Contains \Drupal\Core\Routing\Enhancer\FormRouteEnhancer.
Class
- FormRouteEnhancer
- Enhancer to add a wrapping controller for _form routes.
Namespace
Drupal\Core\Routing\EnhancerCode
public function enhance(array $defaults, Request $request) {
$defaults['_controller'] = 'controller.form:getContentResult';
return $defaults;
}