[OST830498][Changed] metadataid centralized

This commit is contained in:
MaxBUhe 2024-03-25 09:06:22 +01:00
parent 938d1514a6
commit 1ae5a9d926
3 changed files with 18 additions and 5 deletions

View File

@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace D3\GoogleAnalytics4\Application\Model;
class Constants
{
public const OXID_MODULE_ID = 'd3googleanalytics4';
}

View File

@ -12,6 +12,7 @@
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;
@ -36,7 +37,7 @@ class ViewConfig extends ViewConfig_parent
$this->sContainerId = ContainerFactory::getInstance() $this->sContainerId = ContainerFactory::getInstance()
->getContainer() ->getContainer()
->get(ModuleSettingBridgeInterface::class) ->get(ModuleSettingBridgeInterface::class)
->get('d3_gtm_sContainerID', 'd3googleanalytics4'); ->get('d3_gtm_sContainerID', Constants::OXID_MODULE_ID);
} }
return $this->sContainerId; return $this->sContainerId;
} }
@ -162,7 +163,7 @@ class ViewConfig extends ViewConfig_parent
$this->sContainerId = ContainerFactory::getInstance() $this->sContainerId = ContainerFactory::getInstance()
->getContainer() ->getContainer()
->get(ModuleSettingBridgeInterface::class) ->get(ModuleSettingBridgeInterface::class)
->get('d3_gtm_blEnableGA4', 'd3googleanalytics4'); ->get('d3_gtm_blEnableGA4', Constants::OXID_MODULE_ID);
} }
return $this->blGA4enabled; return $this->blGA4enabled;
@ -226,7 +227,7 @@ class ViewConfig extends ViewConfig_parent
return ContainerFactory::getInstance() return ContainerFactory::getInstance()
->getContainer() ->getContainer()
->get(ModuleSettingBridgeInterface::class) ->get(ModuleSettingBridgeInterface::class)
->get('d3_gtm_settings_serversidetagging_js', 'd3googleanalytics4'); ->get('d3_gtm_settings_serversidetagging_js', Constants::OXID_MODULE_ID);
} }
/** /**
@ -239,6 +240,6 @@ class ViewConfig extends ViewConfig_parent
return ContainerFactory::getInstance() return ContainerFactory::getInstance()
->getContainer() ->getContainer()
->get(ModuleSettingBridgeInterface::class) ->get(ModuleSettingBridgeInterface::class)
->get('d3_gtm_settings_serversidetagging_nojs', 'd3googleanalytics4'); ->get('d3_gtm_settings_serversidetagging_nojs', Constants::OXID_MODULE_ID);
} }
} }

View File

@ -1,5 +1,6 @@
<?php <?php
use D3\GoogleAnalytics4\Application\Model\Constants as Constants;
use D3\GoogleAnalytics4\Modules\Application\Component\d3GtmBasketComponentExtension; use D3\GoogleAnalytics4\Modules\Application\Component\d3GtmBasketComponentExtension;
use D3\GoogleAnalytics4\Modules\Application\Component\Widget\d3GtmWidgetArticleDetails as d3GtmWidgetArticleDetails; use D3\GoogleAnalytics4\Modules\Application\Component\Widget\d3GtmWidgetArticleDetails as d3GtmWidgetArticleDetails;
use D3\GoogleAnalytics4\Modules\Application\Controller\ArticleDetailsController; use D3\GoogleAnalytics4\Modules\Application\Controller\ArticleDetailsController;
@ -35,7 +36,7 @@ use OxidEsales\Eshop\Core\ViewConfig as OEViewConfig;
$sMetadataVersion = '2.1'; $sMetadataVersion = '2.1';
$aModule = [ $aModule = [
'id' => 'd3googleanalytics4', 'id' => Constants::OXID_MODULE_ID,
'title' => 'Google Analytics 4', 'title' => 'Google Analytics 4',
'description' => "Dieses Modul bietet die Möglichkeit in Ihrem OXID eShop (6.x) die neue 'Property' 'description' => "Dieses Modul bietet die Möglichkeit in Ihrem OXID eShop (6.x) die neue 'Property'
Google Analytics 4 (GA4) von Google zu integrieren.<br> Google Analytics 4 (GA4) von Google zu integrieren.<br>