Given an entity type id of a fieldable entity type, a bundle name, and a view mode name, how do I construct a url to the respective field_ui form where this view mode can be edited?
The patterns for the route name seem to be:
entity.entity_view_display.ENTITY_TYPE_ID.view_mode
entity.entity_view_display.ENTITY_TYPE_ID.default
But it seems the parameters have custom names, e.g. /admin/structure/types/manage/{node_type}/display/{view_mode_name}
, here the bundle parameter is called node_type
.
Is there a generic way to build such urls to field_ui pages for any entity type?