public function moduleConfigDataAccess($params, $smarty)
    {
        $key = $this->getParam($params, 'key', false);
        $moduleCode = $this->getParam($params, 'module', false);
        $locale = $this->getParam($params, 'locale');

        if (null === $locale) {
            $locale = $this->getSession()->getLang()->getLocale();
        }

        if ($key === false || $moduleCode === false) {
            return null;
        }

        $default = $this->getParam($params, 'default', '');

        if (null !== $module = ModuleQuery::create()->findOneByCode($moduleCode)) {
            return ModuleConfigQuery::create()
                ->getConfigValue(
                    $module->getId(),
                    $key,
                    $default,
                    $locale
                );
        } else {
            Tlog::getInstance()->addWarning(
                sprintf(
                    "Module code '%s' not found in module-config Smarty function",
                    $moduleCode
                )
            );

            $value = $default;
        }

        return $value;
    }