-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix issue #13944. Show Store Views in Terms and Conditions grid. #14546
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 issue #13944. Show Store Views in Terms and Conditions grid. #14546
Conversation
Hi @afirlejczyk , please, sign CLA, otherwise, we can't process your pull request. Thanks! |
Hi @sidolov I signed CLA. I have one more question, I noticed Terms and Condition is not build with UI component. |
Hi @afirlejczyk , yes, it's a good idea! |
* @param array $data | ||
* @codeCoverageIgnore | ||
*/ | ||
public function __construct( | ||
\Magento\Backend\Block\Template\Context $context, | ||
\Magento\Backend\Helper\Data $backendHelper, | ||
\Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory $collectionFactory, | ||
\Magento\CheckoutAgreements\Model\ResourceModel\Agreement\Grid\CollectionFactory $collectionFactory, |
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.
Please, inject new dependencies according to our Backward Compatible Development policy
Thank you for your review @sidolov |
* @codeCoverageIgnore | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
*/ | ||
public function __construct( | ||
\Magento\Backend\Block\Template\Context $context, | ||
\Magento\Backend\Helper\Data $backendHelper, | ||
\Magento\CheckoutAgreements\Model\ResourceModel\Agreement\CollectionFactory $collectionFactory, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
You may leave it as is
) { | ||
$this->_collectionFactory = $collectionFactory; | ||
|
||
$this->_collectionFactory = $gridColFactory |
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.
It would be better define a new private property for grid collection, assign injected object and change all usages to new object (this step caused by backward compatibility, any extension may be used protected $_collectionFactory
and expects concrete object type).
The old property should be marked as deprecated.
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.
Done, I added private variable gridCollectionFactory
Hi @sidolov, thank you for the review. |
Hi @afirlejczyk. Thank you for your contribution. |
Fix showing Store View in Terms and Conditions grid.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist