When I create a custom entity using Drupal console:
drupal generate:entity:content
then Menu paths are generated by default and they work very nicely, i.e. in the Structure Menu there are two entries for Listing entities and for Managing the Custom entity, and it includes sub-menus for Manage Fields, Manage Form Display, and Mangage Display.
Now, to avoid cluttering the structure menu, I like to gather all custom enitites uf a module under a SystemController::systemAdminMenuBlockPage under a path /admin/structure/myCustoModuleGroup/myCustomEntityType
This is easy by inserting 'myCustoModuleGroup' into the paths in the entity annotations and in MyCustomEntityHtmlRouteProvider. Then I update the base_route of the mymodule.links.task.yml
However, then all the submenus for Manage Fields, etc., disappear. This is probably because they no longer have the correct parent.
I would like to end up with Menu entries for:
structure->CustomModule->CustomEntity1Type->Manage Fields
structure->CustomModule->CustomEntity1Type->Manage Form Display
structure->CustomModule->CustomEntity1Type->Manage Display.
structure->CustomModule->CustomEntity2Type->Manage Fields
etc.
Has anybody been able to solve this? I assume there is a way to change the menu link parent in code, since it was certainly declared somewhere, but I cannot find it (spent a whole day trying).