[Changed] cleaning ViewConfig
This commit is contained in:
parent
dbaf871c9e
commit
6053219687
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
namespace D3\GoogleAnalytics4\Modules\Core;
|
namespace D3\GoogleAnalytics4\Modules\Core;
|
||||||
|
|
||||||
use D3\GoogleAnalytics4\Application\Model\Constants;
|
|
||||||
use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
|
use D3\GoogleAnalytics4\Application\Model\ManagerHandler;
|
||||||
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
|
use D3\GoogleAnalytics4\Application\Model\ManagerTypes;
|
||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
@ -146,6 +145,9 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
private $blGA4enabled = null;
|
private $blGA4enabled = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
public function isGA4enabled()
|
public function isGA4enabled()
|
||||||
{
|
{
|
||||||
if ($this->blGA4enabled === null)
|
if ($this->blGA4enabled === null)
|
||||||
@ -156,14 +158,17 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
return $this->blGA4enabled;
|
return $this->blGA4enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function isGtmConsentModeSetActivated() :bool
|
public function isGtmConsentModeSetActivated() :bool
|
||||||
{
|
{
|
||||||
return $this->sContainerId = ContainerFactory::getInstance()
|
return Registry::getConfig()->getConfigParam('d3_gtm_blActivateConsentMode');
|
||||||
->getContainer()
|
|
||||||
->get(ModuleSettingBridgeInterface::class)
|
|
||||||
->get('d3_gtm_blActivateConsentMode', Constants::OXID_MODULE_ID);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return false|string
|
||||||
|
*/
|
||||||
public function getGtmDataLayer()
|
public function getGtmDataLayer()
|
||||||
{
|
{
|
||||||
if (!$this->getGtmContainerId()) return "[]";
|
if (!$this->getGtmContainerId()) return "[]";
|
||||||
@ -202,11 +207,18 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
return json_encode([$dataLayer], JSON_PRETTY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
public function isDebugModeOn() :bool
|
public function isDebugModeOn() :bool
|
||||||
{
|
{
|
||||||
return Registry::getConfig()->getConfigParam('d3_gtm_blEnableDebug');
|
return Registry::getConfig()->getConfigParam('d3_gtm_blEnableDebug');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $listId
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
public function isPromotionList($listId)
|
public function isPromotionList($listId)
|
||||||
{
|
{
|
||||||
$oConfig = Registry::getConfig();
|
$oConfig = Registry::getConfig();
|
||||||
@ -215,8 +227,6 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
public function getServerSidetaggingJsDomain() :string
|
public function getServerSidetaggingJsDomain() :string
|
||||||
{
|
{
|
||||||
@ -225,8 +235,6 @@ class ViewConfig extends ViewConfig_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws NotFoundExceptionInterface
|
|
||||||
*/
|
*/
|
||||||
public function getServerSidetaggingNoJsDomain() :string
|
public function getServerSidetaggingNoJsDomain() :string
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user