87. Araxis Merge File Comparison Report

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.

87.1 Files compared

#LocationFileLast Modified
12020-08-14 00:01:33 +0000
2Porto v3.2.4/Magento 2.x/Porto Theme/app/code/Mageplaza/LayeredNavigation/Plugin/PageCacheIdentifier.php2020-06-26 11:11:14 +0000

87.2 Comparison summary

DescriptionBetween
Files 1 and 2
Text BlocksLines
Unchanged00
Changed00
Inserted175
Removed00

87.3 Comparison options

WhitespaceConsecutive whitespace is treated as a single space
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersNot shown in the comparison detail
Active line-pairing rules

87.4 Active regular expressions

No regular expressions were active.

87.5 Comparison detail

    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 }