-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix/imposible customize product collection #12770
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
Fix/imposible customize product collection #12770
Conversation
…f catalog_block_product_list_collection event
/** | ||
* @var CollectionLoader | ||
*/ | ||
protected $collectionLoader; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New class parameter should be private as we are trying to avoid using protected.
@@ -82,12 +89,14 @@ public function __construct( | |||
Resolver $layerResolver, | |||
CategoryRepositoryInterface $categoryRepository, | |||
Data $urlHelper, | |||
CollectionLoader $collectionLoader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New injections should come last in the construct and should also default to null so as to not break backwards compatibility. More information and examples can be found at http://devdocs.magento.com/guides/v2.2/contributor-guide/backward-compatible-development/index.html#adding-a-constructor-parameter
@@ -38,6 +40,7 @@ public function __construct( | |||
\Magento\Catalog\Model\Layer\Resolver $layerResolver, | |||
CategoryRepositoryInterface $categoryRepository, | |||
\Magento\Framework\Url\Helper\Data $urlHelper, | |||
CollectionLoader $collectionLoader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New injections should come last in the construct and should also default to null so as to not break backwards compatibility. More information and examples can be found at http://devdocs.magento.com/guides/v2.2/contributor-guide/backward-compatible-development/index.html#adding-a-constructor-parameter
@@ -51,6 +54,7 @@ public function __construct( | |||
$layerResolver, | |||
$categoryRepository, | |||
$urlHelper, | |||
$collectionLoader, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New injections should come last in the construct and should also default to null so as to not break backwards compatibility. More information and examples can be found at http://devdocs.magento.com/guides/v2.2/contributor-guide/backward-compatible-development/index.html#adding-a-constructor-parameter
Closing due to inactivity. @dvynograd, feel free to reach me out anytime later if you wish to continue work on this pull request and it will be reopened. |
Reopen #8485
original description:
For more details see the original thread. #8485 (comment)