Skip to content
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

Move Topmenu CategoryData creation to a public method to enable plugin ... #1083

Merged
merged 3 commits into from
May 15, 2015
Merged

Move Topmenu CategoryData creation to a public method to enable plugin ... #1083

merged 3 commits into from
May 15, 2015

Conversation

JamesAnelay
Copy link
Contributor

Magento provides a couple of nice observers that "Allow extensions to modify select (e.g. add custom category attributes to select)" namely catalog_category_flat_loadnodes_before and page_block_html_topmenu_gethtml_before. However once added to the select there is (I belive) no nice way to add the data to the topmenu.

Currently I need to disable catalog_add_topmenu_items and add my own observer to replace it, not very nice as only I can do this meaning other extensions cannot also add data. I propose moving the generation of $categoryData to a seperate public function so that I can add data with Plugins.

@vpelipenko vpelipenko added the MX label Mar 10, 2015
@kokoc kokoc self-assigned this Mar 12, 2015
@kokoc
Copy link
Member

kokoc commented Mar 12, 2015

@JamesAnelay Thank you for the contribution. The code looks great!

✅ CR: passed
✅ Builds: green
✅ Internal reference: MAGETWO-34954

I thought plugins had to be on public methods, turns out this is not the case so have set the method to protected.
@vpelipenko vpelipenko added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Apr 21, 2015
@JamesAnelay
Copy link
Contributor Author

Anychance we can get this merged or closed allready?

@kokoc
Copy link
Member

kokoc commented May 5, 2015

@JamesAnelay sorry for delay. This pull request will be merged as soon as possible

@vpelipenko vpelipenko added in progress Progress: accept and removed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels May 13, 2015
@magento-team magento-team merged commit ebc1039 into magento:develop May 15, 2015
@kokoc
Copy link
Member

kokoc commented May 27, 2015

@JamesAnelay your pull request is merged in 0.74.0-beta9. Thank you very much for your contribution and continued support to Magento 2!

magento-team pushed a commit that referenced this pull request May 5, 2017
[MPI] PHP7 returns types incompatible with generate code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants