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.
instead of using :
$items['admin/structure/menu_manager/%menu/%']
We are going to work with tsid...
We will implement this with a foreach loop.
Comments
Comment #1
iSoLate CreditAttribution: iSoLate commentedDependant on #1934808: Overview of menu items in menu
Comment #2
pfrenssen#1934808: Overview of menu items in menu has landed!
Comment #3
iSoLate CreditAttribution: iSoLate commentedComment #4
Cyberwolf CreditAttribution: Cyberwolf commentedI'll start reviewing this.
Comment #5
Cyberwolf CreditAttribution: Cyberwolf commentedadmin/structure/menu_manager still shows all menus, I think it should only display the menu's which have a translation set.
Inside paddle_menu_manager_menu_overview_form() I'd rather use the i18n translation API methods, like i18n_translation_set_load()) instead of using straight queries on the database.
The tsid is always numeric AFAIK, thus it shouldn't be escaped with check_plain().
Comment #6
Cyberwolf CreditAttribution: Cyberwolf commentedComment #7
iSoLate CreditAttribution: iSoLate commentedComment #8
iSoLate CreditAttribution: iSoLate commentedFixed!
Comment #9
pfrenssenAssigning for review.
Comment #10
pfrenssenThe code looks very good, but I have some small remarks about the tests:
Duplicated code
3 of the tests in
PaddleMenuManagerUITest
start by creating one or more menus. This can be moved to thesetUp()
method.Missing documentation
There is a call to
menu_rebuild()
inPaddleMenuManagerUITest::testMenuOverview()
. This is needed because we are creating menus directly through the API rather than using the menu creation forms. It is rather scary to see this in a test though, so some documentation would be nice.Comment #11
pfrenssenAddressed the issues from #10, and did some more refactoring and cleanup.
Comment #12
pfrenssenOne more small change: use one of the menus created in the setUp() method in testMenuOverviewTypes():
b505050 Reuse one of the menus created in the test setUp().
Comment #13
iSoLate CreditAttribution: iSoLate commentedReviewed pfrenssen his last commits. Looks good!
Merged! ;)