Follow-up from #1814916-54: Convert menus into entities

We have a inconsistency in menus, some of them could be renamed/deleted and some not.

Proposed solution
Move the Menu entity type into Menu module and thus, detaching the entire Menu UI business logic from the low-level {menu_links}.menu_name container concept.

@sun thoughts:

However, in thinking through this issue over the past days, I wondered whether we need the Menu entity at all, and whether we cannot simply move the entire code for menus into Menu module. As a result of doing so, you would no longer see any menu blocks when Menu module is disabled. (Why would anyone expect any menu to appear without it anyway?) — The router/menu link building should not be affected by that; it can still operate on the 'menu_name' property of menu links. Essentially, we'd turn the 'menu_name' property of menu links into a simple "container"/realm that has no further business logic and also no UI attached to it by default. Only by enabling Menu module, those containers/realms are actually turned into something that has business logic behind it.


sun’s picture

andypost’s picture

andypost’s picture

andypost’s picture

YesCT’s picture

andypost’s picture

Suppose this logic could be moved to MenuAccessController after #2012916: Implement access controller for the menu and menu link entity

tim.plunkett’s picture

#2084197: Uninstalling menu module removes all custom menus doesn't remove this, but does relegate it to only be used when we actually care that these are from system (system_preprocess_block, menu_set_active_menu_names, etc)