protected function EntityRouteEnhancer::applies in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer::applies()
- 10 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 - Update the defaults based on its own data and 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'));
}