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

Reference: https://www.drupal.org/core/beta-changes
Prioritized changes This is a trivial bugfix.
Disruption Absolutely none.
CommentFileSizeAuthor
menulinkoverride.patch2.92 KBchx
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

Status: Active » Needs review
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This looks perfect for me, whether this is a BUG, I don't know.

chx’s picture

Assigned: pwolanin » chx

Thanks for the review, I take it back then, I thought only pwolanin would review something like this :)

pwolanin’s picture

Category: Bug report » Task

dawehner wrote as much of this code as me, but looks basically fine to DRY it up.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 4615f8c and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation for to the issue summary.

  • alexpott committed 4615f8c on 8.0.x
    Issue #2388905 by chx: menu link storage override requires too much copy...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.