-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Update CMS Page Index #17066
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
Update CMS Page Index #17066
Conversation
Hi @hryvinskyi. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
* @param \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory | ||
* @var \Magento\Framework\App\Config\ScopeConfigInterface | ||
*/ | ||
protected $scopeConfig; |
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, try to avoid the usage of protected properties, make it private.
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.
Chanched to private.
Why do I need to use private instead of protected?
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.
We don't recommend to use inheritance, that why all class properties should be private. The composition is a better way to extend any logic. More information you can find in Magento Technical Guidelines
Context $context, | ||
ScopeConfigInterface $scopeConfig, | ||
ForwardFactory $resultForwardFactory, | ||
Page $page |
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 Magento Backward Compatible Development Guide
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.
Changed to backward compatible
@sidolov there are some updates? |
Hi @sidolov, thank you for the review. |
Hi @hryvinskyi. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
Remove Object Manager and add dependency injection to constructor,
Fix Code Style
Contribution checklist