From 1ae5a9d92610d7f8fda52bab57d690cabd2cd71c Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Mon, 25 Mar 2024 09:06:22 +0100 Subject: [PATCH] [OST830498][Changed] metadataid centralized --- Application/Model/Constants.php | 11 +++++++++++ Modules/Core/ViewConfig.php | 9 +++++---- metadata.php | 3 ++- 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 Application/Model/Constants.php diff --git a/Application/Model/Constants.php b/Application/Model/Constants.php new file mode 100644 index 0000000..c8035e8 --- /dev/null +++ b/Application/Model/Constants.php @@ -0,0 +1,11 @@ +sContainerId = ContainerFactory::getInstance() ->getContainer() ->get(ModuleSettingBridgeInterface::class) - ->get('d3_gtm_sContainerID', 'd3googleanalytics4'); + ->get('d3_gtm_sContainerID', Constants::OXID_MODULE_ID); } return $this->sContainerId; } @@ -162,7 +163,7 @@ class ViewConfig extends ViewConfig_parent $this->sContainerId = ContainerFactory::getInstance() ->getContainer() ->get(ModuleSettingBridgeInterface::class) - ->get('d3_gtm_blEnableGA4', 'd3googleanalytics4'); + ->get('d3_gtm_blEnableGA4', Constants::OXID_MODULE_ID); } return $this->blGA4enabled; @@ -226,7 +227,7 @@ class ViewConfig extends ViewConfig_parent return ContainerFactory::getInstance() ->getContainer() ->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() ->getContainer() ->get(ModuleSettingBridgeInterface::class) - ->get('d3_gtm_settings_serversidetagging_nojs', 'd3googleanalytics4'); + ->get('d3_gtm_settings_serversidetagging_nojs', Constants::OXID_MODULE_ID); } } \ No newline at end of file diff --git a/metadata.php b/metadata.php index 4965d3e..3545fba 100755 --- a/metadata.php +++ b/metadata.php @@ -1,5 +1,6 @@ 'd3googleanalytics4', + 'id' => Constants::OXID_MODULE_ID, 'title' => 'Google Analytics 4', 'description' => "Dieses Modul bietet die Möglichkeit in Ihrem OXID eShop (6.x) die neue 'Property' Google Analytics 4 (GA4) von Google zu integrieren.