As Symfony is taking over routing, the following systems need a) ways to declare b) some place to store them.
- Menu links. These are becoming entities, so it can be scratched.
- Local tasks. Earlier discussion was at #484234: Big task cleanup: Remove type and tasks from hook_menu().
- Local actions (aka operations on a page, which is just weird)
- Contextual links
- Access control (although that's a routing system's so this might be scratched.
per comment #25:
We take hook_menu as it exists now and add a "route" key. That "route" key refers to a route to which that menu link points. The path of the route *overrides* the path that the menu item has. Then we remove the now-duplicated parts of the menu item definition: page_callback, page_arguments, access control, etc.
Then we modify the link build process to pull in the corresponding route and build out the same structure we have now, more or less. This would also partially if not entirely resolve #1845402: Update menu link access checks for new router.
Benefit: We're no longer duplicating route information between hook_menu and routes. hook_menu is now defining just, er, menus.
Risk: This may or may not collide with what's going on in #916388: Convert menu links into entities. Also, hook_menu keying by path while routes key by name *may* result in some weirdness. We'll only know once we start writing.
We rip action links out of hook_menu entirely, using essentially the model from comment #9. To wit, action links become their own object unto themselves that reference to a route they point TO, and to routes they should appear ON. They are then removed from hook_menu entirely. We then build a block that looks at the current route (which may need to be passed as a literal string, not pulled from the request, TBD), grabs the action links that should be on that route, and displays them. Want to change the L&F? It's a block. Enjoy.
Benefit: Action links get separated from hook_menu, where they didn't belong in the first place.
Keep figuring out what to do with Tabs/Tasks, since those are harder. aka, punt for now so we can unblock.
Implementation happening here:
#1845402: Update menu link access checks for new router
#1908756: Separate Action Links (MENU_LOCAL_ACTION) from hook_menu()
#1947536: Convert drupal_get_breadcrumb() and drupal_set_breadcrumb() to a service
#1954892: Figure out how to deal with 'theme callback'
#1981644: Figure out how to deal with 'title/title callback'
Actually code this thing, then figure out what to do with tasks/tabs.
User interface changes
Probably none for the immediate patch.