-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Task] Add pimcore 10 and 11 support for new menu creation #406
Conversation
I am wondering if we could futher break down and extract menu items to avoid duplicate fragments, at the moment What i want to avoid is that whenever one change something, would always have to apply changes to the other method, but at the same time, it mustn't limit 11 potential improvemenents. |
I'm going to take a look into that. I think the main part is how the menu is added, so I could basically make proper functions to get the menus and then in initToolbar add them the old way and in initMenu, use the new approach. |
I restructured it like I said above. It is still not the nicest way, but much better than before. I think changing it more, would only make it more complicated. |
Looks much better but currently the items in
to just |
Since it is it's own menu, and we do not set the priority anywhere, the priority gets set automatically. I would change this approach tbh because the result would be the same as before, right? Just pushing the function seems legit, but we would have a problem with the customerMenu, itself. If there are no changes for the submenu, then pushing the function is okay, but I would rather go for the a consistent approach. Wdyt? |
Changes in this pull request
Resolves #403
Additional info
If new preMenuBuild Event is available use the new methods, if not use the pimcoreReady Event to setup the menu