protected function EntityRouteEnhancer::applies in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::applies()
- 9 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::applies()
Returns whether the enhancer runs on the current route.
Parameters
\Symfony\Component\Routing\Route $route: The current route.
Return value
bool
1 call to EntityRouteEnhancer::applies()
- EntityRouteEnhancer::enhance in core/
lib/ Drupal/ Core/ Entity/ Enhancer/ EntityRouteEnhancer.php - Updates the defaults for a route definition based on the request.
File
- core/
lib/ Drupal/ Core/ Entity/ Enhancer/ EntityRouteEnhancer.php, line 46
Class
- EntityRouteEnhancer
- Enhances an entity form route with the appropriate controller.
Namespace
Drupal\Core\Entity\EnhancerCode
protected function applies(Route $route) {
return !$route
->hasDefault('_controller') && ($route
->hasDefault('_entity_form') || $route
->hasDefault('_entity_list') || $route
->hasDefault('_entity_view'));
}