![]() 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/magento/module-swatches/ViewModel/Product/Renderer/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types = 1); namespace Magento\Swatches\ViewModel\Product\Renderer; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\View\Element\Block\ArgumentInterface; use Magento\Store\Model\ScopeInterface; /** * Class Configurable */ class Configurable implements ArgumentInterface { /** * Config path if swatch tooltips are enabled */ private const XML_PATH_SHOW_SWATCH_TOOLTIP = 'catalog/frontend/show_swatch_tooltip'; /** * @var ScopeConfigInterface */ private $scopeConfig; /** * Configurable constructor. * * @param ScopeConfigInterface $scopeConfig */ public function __construct(ScopeConfigInterface $scopeConfig) { $this->scopeConfig = $scopeConfig; } /** * Get config if swatch tooltips should be rendered. * * @return string */ public function getShowSwatchTooltip() { return $this->scopeConfig->getValue( self::XML_PATH_SHOW_SWATCH_TOOLTIP, ScopeInterface::SCOPE_STORE ); } }