From 35cac37aa37a3cf0e6186a7a5ceef4c65e180369 Mon Sep 17 00:00:00 2001 From: Grzegorz Bogusz Date: Wed, 11 Oct 2023 12:52:05 +0200 Subject: [PATCH] revert hotfix: configuration is helper now --- Helper/Configuration.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Helper/Configuration.php b/Helper/Configuration.php index 791d677..4300fbb 100644 --- a/Helper/Configuration.php +++ b/Helper/Configuration.php @@ -2,7 +2,7 @@ namespace MageSuite\SeoLinkMasking\Helper; -class Configuration extends \Magento\Framework\App\Helper\AbstractHelper +class Configuration { public const LINK_MASKING_PARAMETER_REGISTRY_KEY = 'link_masking_parameters'; @@ -21,6 +21,13 @@ class Configuration extends \Magento\Framework\App\Helper\AbstractHelper public const XML_PATH_SHOW_SWATCH_TOOLTIP = 'catalog/frontend/show_swatch_tooltip'; + protected \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig; + + public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface) + { + $this->scopeConfig = $scopeConfigInterface; + } + public function isLinkMaskingEnabled($storeId = null): bool { return $this->scopeConfig->isSetFlag(self::XML_PATH_SEO_LINK_MASKING_IS_ENABLED, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $storeId);