Produced by Araxis Merge on 2021-05-13 09:08:41 +0000. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | /Applications/Ampps/www/Porto 3.2.2/Theme Files/Magento 2.x/Porto Theme/app/code/Smartwave/Porto/Block | RickSnippet.php | 2017-03-16 00:42:40 +0000 |
| 2 | /Applications/Ampps/www/Porto v4.0.0/Theme Files/Magento 2.x/Porto Theme/app/code/Smartwave/Porto/Block | RickSnippet.php | 2017-03-16 00:42:40 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 1 | 80 |
| Changed | 0 | 0 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | Consecutive whitespace is treated as a single space |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
| Active line-pairing rules |
No regular expressions were active.
| 1 | <?php | 1 | <?php | |||
| 2 | namespace Smartwave\Porto\Block; | 2 | namespace Smartwave\Porto\Block; | |||
| 3 | 3 | |||||
| 4 | class RickSnippet extends \Magento\Framework\View\Element\Template { | 4 | class RickSnippet extends \Magento\Framework\View\Element\Template { | |||
| 5 | protected $_coreRegistry; | 5 | protected $_coreRegistry; | |||
| 6 | protected $_imageBuilder; | 6 | protected $_imageBuilder; | |||
| 7 | protected $_reviewSummaryFactory; | 7 | protected $_reviewSummaryFactory; | |||
| 8 | public function __construct(\Magento\Catalog\Block\Product\Context $productContext, | 8 | public function __construct(\Magento\Catalog\Block\Product\Context $productContext, | |||
| 9 | \Magento\Review\Model\Review\SummaryFactory $reviewSummaryFactory, | 9 | \Magento\Review\Model\Review\SummaryFactory $reviewSummaryFactory, | |||
| 10 | \Magento\Framework\View\Element\Template\Context $context, array $data = []) | 10 | \Magento\Framework\View\Element\Template\Context $context, array $data = []) | |||
| 11 | { | 11 | { | |||
| 12 | $this->_coreRegistry = $productContext->getRegistry(); | 12 | $this->_coreRegistry = $productContext->getRegistry(); | |||
| 13 | $this->_reviewSummaryFactory = $reviewSummaryFactory; | 13 | $this->_reviewSummaryFactory = $reviewSummaryFactory; | |||
| 14 | $this->_imageBuilder = $productContext->getImageBuilder(); | 14 | $this->_imageBuilder = $productContext->getImageBuilder(); | |||
| 15 | parent::__construct($context, $data); | 15 | parent::__construct($context, $data); | |||
| 16 | } | 16 | } | |||
| 17 | public function getProduct() | 17 | public function getProduct() | |||
| 18 | { | 18 | { | |||
| 19 | return $this->_coreRegistry->registry('product'); | 19 | return $this->_coreRegistry->registry('product'); | |||
| 20 | } | 20 | } | |||
| 21 | public function getImage($product, $imageId, $attributes = []) | 21 | public function getImage($product, $imageId, $attributes = []) | |||
| 22 | { | 22 | { | |||
| 23 | return $this->_imageBuilder->setProduct($product) | 23 | return $this->_imageBuilder->setProduct($product) | |||
| 24 | ->setImageId($imageId) | 24 | ->setImageId($imageId) | |||
| 25 | ->setAttributes($attributes) | 25 | ->setAttributes($attributes) | |||
| 26 | ->create(); | 26 | ->create(); | |||
| 27 | } | 27 | } | |||
| 28 | public function getReviewSummary() | 28 | public function getReviewSummary() | |||
| 29 | { | 29 | { | |||
| 30 | $storeId = $this->_storeManager->getStore()->getId(); | 30 | $storeId = $this->_storeManager->getStore()->getId(); | |||
| 31 | $reviewSummary = $this->_reviewSummaryFactory->create(); | 31 | $reviewSummary = $this->_reviewSummaryFactory->create(); | |||
| 32 | $reviewSummary->setData('store_id', $storeId); | 32 | $reviewSummary->setData('store_id', $storeId); | |||
| 33 | $summaryModel = $reviewSummary->load($this->getProduct()->getId()); | 33 | $summaryModel = $reviewSummary->load($this->getProduct()->getId()); | |||
| 34 | 34 | |||||
| 35 | return $summaryModel; | 35 | return $summaryModel; | |||
| 36 | } | 36 | } | |||
| 37 | public function getCurrencyCode() { | 37 | public function getCurrencyCode() { | |||
| 38 | return $this->_storeManager->getStore()->getCurrentCurrencyCode(); | 38 | return $this->_storeManager->getStore()->getCurrentCurrencyCode(); | |||
| 39 | } | 39 | } | |||
| 40 | } | 40 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.