Updated: Comment #0
Problem/Motivation
Altering the menu list is messy.
See #2004428: Less ugly operations altering.
Also, this is probably already intended to be done as part of converting to configuration and entities.
Proposed resolution
Use EntityListController for menus
Remaining tasks
Decide if this is a duplicate.
Look at #1891690: Use EntityListController for vocabularies for an example of how to get started (is there a better one?)
User interface changes
No.
API changes
?
Related Issues
#1882552: Deprecate menu_list_system_menus() and menu_ui_get_menus()
#663946: Merge "List links" page into "Edit menu" page
#1891690: Use EntityListController for vocabularies
#2004428-17: Less ugly operations altering
#2023739: menu: hook_entity_operation_alter() does not work with EntityListController
Comments
Comment #1
andypostThat's already done
See MenuListController.php
Comment #2
YesCT CreditAttribution: YesCT commentedThis is from Menu.php
I thought I'd see something like:
the "list" controller,
in Vocabulary.php
Comment #3
andypostSu, but we allow menu module to be disabled so Menu-entity defined in system module and once menu module enabled we use
menu_entity_info_alter()
to add controllersComment #4
YesCT CreditAttribution: YesCT commentedoh, I missed that *done* link in #1
Which shows:
Comment #5
YesCT CreditAttribution: YesCT commentedOK, since it is using list controllers. the problem is a different one...
#2023739: menu: hook_entity_operation_alter() does not work with EntityListController
Comment #5.0
YesCT CreditAttribution: YesCT commentedadded related issue