Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
While the menu tree storage is pluggable a lot of logic is inside MenuTreeStorage. If one wants to override this class huge chunks need to be copy pasted.
Proposed resolution
Break out a few database calls into methods. In case of delete this actually leads to code reuse so the patch is actually code negative. Also, the simple method headers are also telling that these are quite standalone.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Beta phase evaluation
Prioritized changes | This is a trivial bugfix. |
---|---|
Disruption | Absolutely none. |
Comment | File | Size | Author |
---|---|---|---|
menulinkoverride.patch | 2.92 KB | chx | |
Comments
Comment #1
chx CreditAttribution: chx commentedComment #2
dawehnerThis looks perfect for me, whether this is a BUG, I don't know.
Comment #3
chx CreditAttribution: chx commentedThanks for the review, I take it back then, I thought only pwolanin would review something like this :)
Comment #4
pwolanin CreditAttribution: pwolanin commenteddawehner wrote as much of this code as me, but looks basically fine to DRY it up.
Comment #5
alexpottCommitted 4615f8c and pushed to 8.0.x. Thanks!
Thanks for adding the beta evaluation for to the issue summary.