function FormRouteEnhancer::enhance
Same name in other branches
- 9 core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php \Drupal\Core\Routing\Enhancer\FormRouteEnhancer::enhance()
- 10 core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php \Drupal\Core\Routing\Enhancer\FormRouteEnhancer::enhance()
- 11.x core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php \Drupal\Core\Routing\Enhancer\FormRouteEnhancer::enhance()
File
-
core/
lib/ Drupal/ Core/ Routing/ Enhancer/ FormRouteEnhancer.php, line 30
Class
- FormRouteEnhancer
- Enhancer to add a wrapping controller for _form routes.
Namespace
Drupal\Core\Routing\EnhancerCode
public function enhance(array $defaults, Request $request) {
$route = $defaults[RouteObjectInterface::ROUTE_OBJECT];
if (!$this->applies($route)) {
return $defaults;
}
$defaults['_controller'] = 'controller.form:getContentResult';
return $defaults;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.