else { $defaults['bundle_key'
] =
$entity_type->
getBundleEntityType();
} } $requirements =
[];
$requirements['_field_ui_view_mode_access'
] = 'administer ' .
$entity_type_id . ' display';
$options =
$entity_route->
getOptions();
$options['_admin_route'
] = FALSE;
$this->
buildLayoutRoutes($collection,
$this->
getPluginDefinition(),
$path,
$defaults,
$requirements,
$options,
$entity_type_id, 'entity_view_display'
);
// Set field_ui.route_enhancer to run on the manage layout form.
if (isset($defaults['bundle_key'
])) { $collection->
get("layout_builder.defaults.
$entity_type_id.view"
) ->
setOption('_field_ui', TRUE
) ->
setDefault('bundle', ''
);
} $route_names =
[ "entity.entity_view_display.{
$entity_type_id}.default",
"entity.entity_view_display.{
$entity_type_id}.view_mode",
];