Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityRouteEnhancer.php

function 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\Enhancer

Code

protected function applies(Route $route) {
    return !$route->hasDefault('_controller') && ($route->hasDefault('_entity_form') || $route->hasDefault('_entity_list') || $route->hasDefault('_entity_view'));
}
RSS feed
Powered by Drupal