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-seomarkup/Block/Head/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/mageworx/module-seomarkup/Block/Head/Json.php
<?php
/**
 * Copyright © 2016 MageWorx. All rights reserved.
 * See LICENSE.txt for license details.
 */
namespace MageWorx\SeoMarkup\Block\Head;

use MageWorx\SeoAll\Helper\SeoFeaturesStatusProvider;

abstract class Json extends \MageWorx\SeoMarkup\Block\Head
{
    /**
     * @var $moduleName
     */
    protected $moduleName = 'SeoMarkup';

    /**
     * @var \MageWorx\SeoAll\Helper\SeoFeaturesStatusProvider $seoFeaturesStatusProvider
     */
    protected $seoFeaturesStatusProvider;

    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param array $data
     * @param SeoFeaturesStatusProvider $seoFeaturesStatusProvider
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        array $data,
        SeoFeaturesStatusProvider $seoFeaturesStatusProvider = null

    ) {
        $this->seoFeaturesStatusProvider = $seoFeaturesStatusProvider;
        parent::__construct($context, $data);
    }

    /**
     *
     * {@inheritDoc}
     */
    protected function _toHtml()
    {
        if ($this->seoFeaturesStatusProvider) {
            if ($this->seoFeaturesStatusProvider->getStatus($this->moduleName)) {
                return '';
            }
        }

        return $this->getMarkupHtml();
    }

    /**
     * @param string $url
     * @return string
     */
    protected function renderUrl($url)
    {
        if (in_array(parse_url($this->_urlBuilder->getCurrentUrl(), PHP_URL_PATH), ['/graphql', '/graphql/'])) {
            $baseUrl = explode('?', $this->_urlBuilder->getBaseUrl())[0];

            return str_replace($baseUrl, '', $url);
        }

        return $url;
    }
}

Spamworldpro Mini