Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/mageworx/module-seourls/Plugin/UrlReplacer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/mageworx/module-seourls/Plugin/UrlReplacer/AroundGetCurrentConvertedUrl.php
<?php
/**
 * Copyright © 2017 MageWorx. All rights reserved.
 * See LICENSE.txt for license details.
 */
namespace MageWorx\SeoUrls\Plugin\UrlReplacer;

use \MageWorx\SeoUrls\Model\Source\PagerMask;
use Magento\Framework\View\Element\Template;
use MageWorx\SeoAll\Helper\Layer as SeoAllHelperLayer;

class AroundGetCurrentConvertedUrl
{
    /**
     * @var \MageWorx\SeoUrls\Helper\Data
     */
    protected $helperData;

    /**
     * @var \MageWorx\SeoUrls\Helper\UrlBuildWrapper
     */
    protected $urlBuildWrapper;

    /**
     * AroundGetCurrentConvertedUrl constructor.
     * @param \MageWorx\SeoUrls\Helper\Data $helperData
     * @param \MageWorx\SeoUrls\Helper\UrlBuildWrapper $urlBuildWrapper
     */
    public function __construct(
        \MageWorx\SeoUrls\Helper\Data $helperData,
        \MageWorx\SeoUrls\Helper\UrlBuildWrapper $urlBuildWrapper
    ) {
        $this->helperData         = $helperData;
        $this->urlBuildWrapper    = $urlBuildWrapper;
    }

    /**
     * @param Template $subject
     * @param $proceed
     * @param array $params
     * @return mixed
     */
    public function aroundGetCurrentConvertedUrl(Template $subject, \Closure $proceed)
    {
        if ($this->out()) {
            return $proceed();
        }
        return $this->urlBuildWrapper->getCurrentFiltersUrl();
    }

    /**
     * @return bool
     */
    protected function out()
    {
        if (!$this->helperData->getIsSeoFiltersEnable()) {
            return true;
        }

        return !$this->helperData->getIsCompatiblePage();
    }
}

Spamworldpro Mini