Blocked on https://www.drupal.org/project/drupal/issues/1882552#comment-12935833

Problem/Motivation

menu_ui_get_menus() has a couple of issues right now:

  • It is quite uncommon to provide users a selection of menu names (not menu items)
  • Given that exposing this as "API" doesn't make much sense
  • When you pass in FALSE you get menu entries back, which might not exist, as you could delete for example the footer menu
  • Having the function in menu_ui is a bit weird as well as nothing from it relies on the menu_ui module, given that menu entities are defined in system

Proposed resolution

Deprecate menu_ui_get_menus and replace all its usages with loading menu entities directly.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

dawehner created an issue. See original summary.

andypost’s picture

Added this issue to updated CR https://www.drupal.org/node/3027453

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andypost’s picture

Status: Active » Postponed
StatusFileSize
new1.84 KB
new4.08 KB

re-roll for 9.3 to check amount failed tests

andypost’s picture

StatusFileSize
new3.06 KB

valid patch

andypost’s picture

StatusFileSize
new2.86 KB
+++ b/core/modules/menu_ui/menu_ui.module
similarity index 100%
copy from core/modules/menu_ui/menu_ui.module

copy from core/modules/menu_ui/menu_ui.module
copy to core/modules/menu_ui/menu_ui.module.orig

one more file((

daffie’s picture

daffie’s picture

Title: [pp-1] Deprecate menu_ui_get_menus() and replace all of its usages » Deprecate menu_ui_get_menus() and replace all of its usages
andypost’s picture

StatusFileSize
new571 bytes
new1.57 KB
andypost’s picture

StatusFileSize
new823 bytes
new1.63 KB

It needs only labels

andypost’s picture

StatusFileSize
new887 bytes
new1.63 KB

formating fix

alexpott’s picture

Status: Needs work » Closed (duplicate)

Let's mark this a duplicate of #1882552: Deprecate menu_list_system_menus() and menu_ui_get_menus() as deprecating menu_ui_get_menus() and menu_ui_get_menus() at the same makes things simpler and also in contrib they are often used together like this...

  $menu_enabled = $this->moduleHandler->moduleExists('menu_ui');
  $menus = $menu_enabled ? menu_ui_get_menus() : menu_list_system_menus();

Going to transfer credit to that issue.