You are here

public function ManageDisplayRouteEnhancer::enhance in Manage display 8

File

modules/manage_display_fix_title/src/Entity/ManageDisplayRouteEnhancer.php, line 21

Class

ManageDisplayRouteEnhancer
Enhances an entity form route with the appropriate controller.

Namespace

Drupal\manage_display_fix_title\Entity

Code

public function enhance(array $defaults, Request $request) {
  if (empty(self::CONTROLLER_REPLACE[$defaults['_controller']])) {
    return $defaults;
  }
  $defaults['_controller'] = self::CONTROLLER_REPLACE[$defaults['_controller']];
  return $defaults;
}