You are here

protected function FormRouteEnhancer::applies in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php \Drupal\Core\Routing\Enhancer\FormRouteEnhancer::applies()
  2. 10 core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php \Drupal\Core\Routing\Enhancer\FormRouteEnhancer::applies()

Returns whether the enhancer runs on the current route.

Parameters

\Drupal\Core\Routing\Enhancer\Route $route: The current route.

Return value

bool

1 call to FormRouteEnhancer::applies()
FormRouteEnhancer::enhance in core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php
Update the defaults based on its own data and the request.

File

core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php, line 23

Class

FormRouteEnhancer
Enhancer to add a wrapping controller for _form routes.

Namespace

Drupal\Core\Routing\Enhancer

Code

protected function applies(Route $route) {
  return $route
    ->hasDefault('_form') && !$route
    ->hasDefault('_controller');
}