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/extmag/shiplab/Block/Adminhtml/Configuration/Form/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/extmag/shiplab/Block/Adminhtml/Configuration/Form/Field.php
<?php
/**
 * Copyright © Extmag. All rights reserved.
 */

namespace Extmag\Shiplab\Block\Adminhtml\Configuration\Form;

use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\Data\Form\Element\Renderer\RendererInterface;
use Magento\Framework\Phrase;

/**
 * Render field html element in Stores Configuration
 *
 * @api
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 * @SuppressWarnings(PHPMD.NumberOfChildren)
 * @since 100.0.2
 */
class Field extends \Magento\Config\Block\System\Config\Form\Field implements RendererInterface
{
    /**
     * Check if inheritance checkbox has to be rendered
     *
     * @param AbstractElement $element
     * @return bool
     */
    protected function _isInheritCheckboxRequired(AbstractElement $element)
    {
        return $element->getCanUseStoreValue()
            || $element->getCanUseDirectionValue()
            || $element->getCanUseDefaultValue()
            || $element->getCanRestoreToDefault();
    }

    /**
     * Retrieve label for the inheritance checkbox
     *
     * @param AbstractElement $element
     * @return Phrase
     */
    protected function _getInheritCheckboxLabel(AbstractElement $element)
    {
        $checkboxLabel = __('Use system value');
        if ($element->getCanUseDefaultValue()) {
            $checkboxLabel = __('Use Default');
        }
        if ($element->getCanUseStoreValue()) {
            $checkboxLabel = __('Use Default');
        }
        if ($element->getCanUseDirectionValue()) {
            $checkboxLabel = __('Use Store');
        }
        if ($element->getCanUseCountryValue()) {
            $checkboxLabel = __('Use Direction');
        }
        return $checkboxLabel;
    }

    /**
     * Render scope label
     *
     * @param AbstractElement $element
     * @return string
     */
    protected function _renderScopeLabel(AbstractElement $element)
    {
        $scopeString = '';
        if ($element->getScope()) {
            $scopeString .= ' data-config-scope="' . $element->getScopeLabel() . '"';
        }

        return $scopeString;
    }
}

Spamworldpro Mini