FormRouteEnhancer.php in Zircon Profile 8
File
core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php
View source
<?php
namespace Drupal\Core\Routing\Enhancer;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Route;
class FormRouteEnhancer implements RouteEnhancerInterface {
public function applies(Route $route) {
return $route
->hasDefault('_form') && !$route
->hasDefault('_controller');
}
public function enhance(array $defaults, Request $request) {
$defaults['_controller'] = 'controller.form:getContentResult';
return $defaults;
}
}