- 🇧🇪Belgium lobsterr
1) Since, we have already made manipulators alterable ✨ Make menu tree manipulators alterable Needs review , it is already possible to add it on your modules
2) I wanted to add a solution from #2 to the module by default, but since there is work in progress and they are changing the names of methods. I am not going to include
3) I like the approach to pass tree to a hook too, because ✨ Allow MenuLinkTree manipulators to be altered Needs work they also pass $tree to the event. So, let's add it too, but I propose to pass in the end to keep backward compatibility.function my_module_superfish_manipulators_alter(array &$manipulators, $menu_name= NULL, &$tree = []) { if ($menu_name == 'main') { $manipulators[] = ['callable' => 'menu.language_tree_manipulator:filterLanguage']; } }
- @lobsterr opened merge request.
-
lobsterr →
committed f964a9b8 on 8.x-1.x
Issue #3014242: Pass the menu tree to alter hook.
-
lobsterr →
committed f964a9b8 on 8.x-1.x
- 🇬🇷Greece bserem
@lobsterr it would be wise to grant credit to the people who have worked on this over the last 7 years and provided fixes to the issue by contributing patches until one of the maintainers sat down to deal with the issue.
Crediting yourself alone is not the way to encourage people to work on open source projects.
- 🇧🇪Belgium lobsterr
Well, it wasn't my intention. Honestly, I didn't even try to take all credits for this ticket.
but when you create MR it automatically assigns participants.
If you know the way how to do it I will. The only way I see here is to create an empty commit.
- 🇬🇷Greece bserem
It's good to know it wasn't intentional, that means a lot :)
As a maintainer you can see at the bottom of the drupal issue (above the green action buttons) the "Credit & Committing" section.
In there you should have an option to check/uncheck who participated.
I am adding a screenshot of this area from a different module, just to highlight how it looks like.You can chose whoever you want. It is customary to pick people who contributed with a patch and/or testing notes (even if not providing code patches).
Once you fix the issue, and after 14days pass when it gets closed, people will get credit.
It also gives you the commit message if needed, but I believe it is enough to just do the checkboxes. - 🇧🇪Belgium lobsterr
Ok, thanks for info, I was always thinking it takes info from the commit message!
I have credited participants!