You are here

public function RngRouteEnhancer::applies in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Routing/Enhancer/RngRouteEnhancer.php \Drupal\rng\Routing\Enhancer\RngRouteEnhancer::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/Enhancer/RngRouteEnhancer.php, line 17

Class

RngRouteEnhancer
Route enhancer for RNG.

Namespace

Drupal\rng\Routing\Enhancer

Code

public function applies(Route $route) {
  return $route
    ->hasRequirement('_entity_is_event') && $route
    ->hasDefault('event');
}