class EntityBundleRouteEnhancer implements EnhancerInterface (View source)

Sets the bundle parameter for routes with the _field_ui option.

Properties

protected EntityTypeManagerInterface $entityTypeManager

The entity type manager service.

Methods

__construct(EntityTypeManagerInterface $entity_type_manager)

Constructs a EntityBundleRouteEnhancer object.

array
enhance(array $defaults, Request $request)

Updates the defaults for a route definition based on the request.

applies(Route $route)

{@inheritdoc}

Details

__construct(EntityTypeManagerInterface $entity_type_manager)

Constructs a EntityBundleRouteEnhancer object.

Parameters

EntityTypeManagerInterface $entity_type_manager

The entity type manager service.

array enhance(array $defaults, Request $request)

Updates the defaults for a route definition based on the request.

Parameters

array $defaults

The defaults, maps to '_defaults' in the route definition YAML.

Request $request

The Request instance.

Return Value

array

The modified defaults. Each enhancer MUST return the $defaults but may add or remove values.

protected applies(Route $route)

{@inheritdoc}

Parameters

Route $route