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)

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.