Produced by Araxis Merge on 2020-08-14 00:01:33 +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 | 2020-08-14 00:01:33 +0000 | ||
| 2 | Porto v3.2.4/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/Plugin/PageCache | Identifier.php | 2020-06-26 11:11:14 +0000 |
| Description | Between Files 1 and 2 | |
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 75 |
| 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 | |||||
| 2 | /** | |||||
| 3 | * Mageplaza | |||||
| 4 | * | |||||
| 5 | * NOTICE OF LICENSE | |||||
| 6 | * | |||||
| 7 | * This source file is subject to the Mageplaza.com license that is | |||||
| 8 | * available through the world-wide-web at this URL: | |||||
| 9 | * https://www.mageplaza.com/LICENSE.txt | |||||
| 10 | * | |||||
| 11 | * DISCLAIMER | |||||
| 12 | * | |||||
| 13 | * Do not edit or add to this file if you wish to upgrade this extension to newer | |||||
| 14 | * version in the future. | |||||
| 15 | * | |||||
| 16 | * @category Mageplaza | |||||
| 17 | * @package Mageplaza_LayeredNavigation | |||||
| 18 | * @copyright Copyright (c) Mageplaza (https://www.mageplaza.com/) | |||||
| 19 | * @license https://www.mageplaza.com/LICENSE.txt | |||||
| 20 | */ | |||||
| 21 | ||||||
| 22 | namespace Mageplaza\LayeredNavigation\Plugin\PageCache; | |||||
| 23 | ||||||
| 24 | use Magento\Framework\App\Request\Http; | |||||
| 25 | use Mageplaza\LayeredNavigation\Helper\Data; | |||||
| 26 | ||||||
| 27 | /** | |||||
| 28 | * Class Identifier | |||||
| 29 | * @package Mageplaza\LayeredNavigation\Plugin\PageCache | |||||
| 30 | */ | |||||
| 31 | class Identifier | |||||
| 32 | { | |||||
| 33 | /** | |||||
| 34 | * @var Http | |||||
| 35 | */ | |||||
| 36 | protected $request; | |||||
| 37 | ||||||
| 38 | /** | |||||
| 39 | * @var Data | |||||
| 40 | */ | |||||
| 41 | protected $helperData; | |||||
| 42 | ||||||
| 43 | /** | |||||
| 44 | * Identifier constructor. | |||||
| 45 | * | |||||
| 46 | * @param Http $request | |||||
| 47 | * @param Data $helperData | |||||
| 48 | */ | |||||
| 49 | public function __construct( | |||||
| 50 | Http $request, | |||||
| 51 | Data $helperData | |||||
| 52 | ) { | |||||
| 53 | $this->request = $request; | |||||
| 54 | $this->helperData = $helperData; | |||||
| 55 | } | |||||
| 56 | ||||||
| 57 | /** | |||||
| 58 | * @param \Magento\Framework\App\PageCache\Identifier $subject | |||||
| 59 | * @param $result | |||||
| 60 | * | |||||
| 61 | * @return string | |||||
| 62 | */ | |||||
| 63 | public function afterGetValue(\Magento\Framework\App\PageCache\Identifier $subject, $result) | |||||
| 64 | { | |||||
| 65 | if (!$this->helperData->isEnabled()) { | |||||
| 66 | return $result; | |||||
| 67 | } | |||||
| 68 | ||||||
| 69 | $payload = Data::jsonDecode($this->request->getContent()); | |||||
| 70 | $isLayer = isset($payload['mp_layer']) ? $payload['mp_layer'] : false; | |||||
| 71 | $result .= $isLayer ? 'mplayer' : ''; | |||||
| 72 | ||||||
| 73 | return $result; | |||||
| 74 | } | |||||
| 75 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993–2019 Araxis Ltd (www.araxis.com). All rights reserved.