-
Notifications
You must be signed in to change notification settings - Fork 2
APF 420 #86
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
base: integration
Are you sure you want to change the base?
APF 420 #86
Conversation
| /** | ||
| * @return string | ||
| */ | ||
| protected function renderUpdateNotification(): string |
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.
An improvement could be here made by separating the HTML rendering to a separate block class/view model with .phtml template.
$updateNotificationBlock = $this->layout->createBlock(<block_path>); return $updateNotificationBlock->toHtml();
where the template path is set in the constructor or as an overridden property in the block class.
| return $html; | ||
| } | ||
|
|
||
| protected function _getHeaderTitleHtml($element): string |
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.
Also could be a separate block for rendering the html
| /** | ||
| * module JSON url | ||
| */ | ||
| const URL = 'https://repo.packagist.org/p2/amzn/amazon-pay-magento-2-module.json'; |
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.
Maybe not an improvement, but a neat alternative. You can move this hard coded value to xml configuration.
private string $repoSource; public function __construct(string $repoSource = '') { $this->repoSource = $repoSource; }
di.xml
<type name="<class>"> <arguments> <argument name="repoSource" xsi:type="string">https://repo.packagist.org/p2/amzn/amazon-pay-magento-2-module.json</argument> </arguments> </type>
Added "New version update available" message notice on Amazon Payment settings.