magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.45k stars 9.29k forks source link

[Issue] Use MenuCategoryData to generate array in TopMenu plugin to allow extension via plugins #29664

Open m2-assistant[bot] opened 4 years ago

m2-assistant[bot] commented 4 years ago

This issue is automatically created based on existing pull request: magento/magento2#28715: Use MenuCategoryData to generate array in TopMenu plugin to allow extension via plugins


Description

Following discussion on Magento Community Engineering Slack instance, it has become clear that the private method Magento\Catalog\Plugin\Block\Topmenu::getCategoryAsArray() should be abstracted to allow extension via plugin (as inheritance (via preference) is to be discouraged). It appears that an existing class provides most of the functionality required. This pull request changes getCategoryAsArray() to use this existing external class (with public method) to allow this data to be augmented via plugin on the latter.

Related Pull Requests

None known

Fixed Issues

None known

Manual testing scenarios

See also discussion on Slack (link above).

  1. Attempt to add an item to output of getCategoryAsArray() from external code (third party extension)

Questions or comments

I have not yet adjusted any tests, however this should not result in any change in functionality.

Contribution checklist (*)

m2-assistant[bot] commented 2 months ago

Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-November commented 2 months ago

Hello @fredden,

Thank you for the report and collaboration!

Going through the PR changes, this issue can be confirmed.

github-jira-sync-bot commented 2 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12341 is successfully created for this GitHub issue.

m2-assistant[bot] commented 2 months ago

:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.