public function EntityRouteEnhancer::applies in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::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/ Entity/ Enhancer/ EntityRouteEnhancer.php, line 41 - Contains \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer.
Class
- EntityRouteEnhancer
- Enhances an entity form route with the appropriate controller.
Namespace
Drupal\Core\Entity\EnhancerCode
public function applies(Route $route) {
return !$route
->hasDefault('_controller') && ($route
->hasDefault('_entity_form') || $route
->hasDefault('_entity_list') || $route
->hasDefault('_entity_view'));
}