public function WizardEnhancer::enhance in Chaos Tool Suite (ctools) 8.3
File
- src/
Routing/ Enhancer/ WizardEnhancer.php, line 18
Class
- WizardEnhancer
- Sets the request format onto the request object.
Namespace
Drupal\ctools\Routing\EnhancerCode
public function enhance(array $defaults, Request $request) {
$route = $defaults[RouteObjectInterface::ROUTE_OBJECT];
if (!$this
->isApplicable($route)) {
return $defaults;
}
if (!empty($defaults['_wizard'])) {
$defaults['_controller'] = 'ctools.wizard.form:getContentResult';
}
if (!empty($defaults['_entity_wizard'])) {
$defaults['_controller'] = 'ctools.wizard.entity.form:getContentResult';
}
return $defaults;
}