You are here

public function FormRouteEnhancer::applies in Zircon Profile 8.0

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

Declares if the route enhancer applies to the given route.

Parameters

\Symfony\Component\Routing\Route $route: The route to consider attaching to.

Return value

bool TRUE if the check applies to the passed route, False otherwise.

Overrides RouteEnhancerInterface::applies

File

core/lib/Drupal/Core/Routing/Enhancer/FormRouteEnhancer.php, line 21
Contains \Drupal\Core\Routing\Enhancer\FormRouteEnhancer.

Class

FormRouteEnhancer
Enhancer to add a wrapping controller for _form routes.

Namespace

Drupal\Core\Routing\Enhancer

Code

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