public function RngRouteEnhancer::applies in RNG - Events and Registrations 8.2
Same name and namespace in other branches
- 8 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\EnhancerCode
public function applies(Route $route) {
return $route
->hasRequirement('_entity_is_event') && $route
->hasDefault('event');
}