ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* @package Plumrocket_GlobalPrivacyControl
|
||||
* @copyright Copyright (c) 2025 Plumrocket Inc.
|
||||
* @license https://plumrocket.com/license End-user License Agreement
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Plumrocket\GlobalPrivacyControl\Helper;
|
||||
|
||||
use Magento\Framework\App\Helper\Context;
|
||||
use Plumrocket\Base\Api\ConfigUtilsInterface;
|
||||
use Plumrocket\Base\Helper\ConfigUtils;
|
||||
|
||||
class Config extends ConfigUtils
|
||||
{
|
||||
public const XML_PATH_IS_MODULE_ENABLED = 'pr_gpc/general/enabled';
|
||||
|
||||
public const XML_PATH_WELL_KNOWN_LAST_UPDATE_DATE = 'pr_gpc/well_known/last_update';
|
||||
|
||||
/**
|
||||
* @var \Plumrocket\Base\Api\ConfigUtilsInterface
|
||||
*/
|
||||
private $configUtils;
|
||||
|
||||
/**
|
||||
* @param \Magento\Framework\App\Helper\Context $context
|
||||
* @param \Plumrocket\Base\Api\ConfigUtilsInterface $configUtils
|
||||
*/
|
||||
public function __construct(
|
||||
Context $context,
|
||||
ConfigUtilsInterface $configUtils
|
||||
) {
|
||||
parent::__construct($context);
|
||||
$this->configUtils = $configUtils;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $store
|
||||
* @param $scope
|
||||
* @return bool
|
||||
*/
|
||||
public function isModuleEnabled($store = null, $scope = null): bool
|
||||
{
|
||||
return $this->configUtils->isSetFlag(self::XML_PATH_IS_MODULE_ENABLED, $store, $scope);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $store
|
||||
* @param null $scope
|
||||
* @return string|null
|
||||
*/
|
||||
public function getWellKnownLastUpdateDate($store = null, $scope = null): ?string
|
||||
{
|
||||
return $this->getConfig(self::XML_PATH_WELL_KNOWN_LAST_UPDATE_DATE, $store, $scope);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user