request = $request; $this->configUtils = $configUtils; } /** * Get config for current scope selected in admin. * * @param string $path * @return string */ public function getScopedConfig(string $path): string { if ($scopeCode = $this->request->getParam('website')) { $scopeType = ScopeInterface::SCOPE_WEBSITE; } elseif ($scopeCode = $this->request->getParam('store')) { $scopeType = ScopeInterface::SCOPE_STORE; } else { $scopeCode = null; $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT; } return (string) $this->configUtils->getConfig($path, $scopeCode, $scopeType); } }