You are here

public function RouteEnhancer::applies in Automatic Entity Label 8

Same name and namespace in other branches
  1. 8.3 src/Routing/RouteEnhancer.php \Drupal\auto_entitylabel\Routing\RouteEnhancer::applies()
  2. 8.2 src/Routing/RouteEnhancer.php \Drupal\auto_entitylabel\Routing\RouteEnhancer::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

src/Routing/RouteEnhancer.php, line 52

Class

RouteEnhancer
Route Enhancer class.

Namespace

Drupal\auto_entitylabel\Routing

Code

public function applies(Route $route) {
  return $route
    ->hasOption('auto_label');
}