diff --git a/Application/Controller/Admin/d3ActionWizard.php b/Application/Controller/Admin/d3ActionWizard.php index 33967eb..ca16519 100644 --- a/Application/Controller/Admin/d3ActionWizard.php +++ b/Application/Controller/Admin/d3ActionWizard.php @@ -24,8 +24,10 @@ use D3\DataWizard\Application\Model\Exceptions\TaskException; use D3\ModCfg\Application\Model\d3database; use Doctrine\DBAL\Exception as DBALException; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; -use OxidEsales\Eshop\Core\Config; use OxidEsales\Eshop\Core\Registry; +use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory; +use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingService; +use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; @@ -81,7 +83,7 @@ class d3ActionWizard extends AdminDetailsController [ $queryString, $parameters ] = $action->getQuery(); - if ($this->d3GetConfig()->getConfigParam('d3datawizard_debug')) { + if ($this->getSettingsService()->getBoolean('d3datawizard_debug', Constants::OXID_MODULE_ID)) { /** @var DebugException $debug */ $debug = oxNew( DebugException::class, @@ -94,11 +96,13 @@ class d3ActionWizard extends AdminDetailsController } /** - * @return Config + * @return ModuleSettingService + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ - public function d3GetConfig(): Config + public function getSettingsService(): ModuleSettingServiceInterface { - return Registry::getConfig(); + return ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class); } public function getUserMessages(): ?string diff --git a/Application/Controller/Admin/d3ExportWizard.php b/Application/Controller/Admin/d3ExportWizard.php index 2dff608..10a3920 100644 --- a/Application/Controller/Admin/d3ExportWizard.php +++ b/Application/Controller/Admin/d3ExportWizard.php @@ -26,11 +26,13 @@ use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException; use Doctrine\DBAL\Driver\Exception; use Doctrine\DBAL\Exception as DBALException; use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController; -use OxidEsales\Eshop\Core\Config; use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException; use OxidEsales\Eshop\Core\Exception\DatabaseErrorException; use OxidEsales\Eshop\Core\Exception\StandardException; use OxidEsales\Eshop\Core\Registry; +use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory; +use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingService; +use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; @@ -95,7 +97,7 @@ class d3ExportWizard extends AdminDetailsController [ $queryString, $parameters ] = $export->getQuery(); - if ($this->d3GetConfig()->getConfigParam('d3datawizard_debug')) { + if ($this->getSettingsService()->getBoolean('d3datawizard_debug', Constants::OXID_MODULE_ID)) { throw oxNew( DebugException::class, d3database::getInstance()->getPreparedStatementQuery($queryString, $parameters) @@ -106,11 +108,13 @@ class d3ExportWizard extends AdminDetailsController } /** - * @return Config + * @return ModuleSettingService + * @throws ContainerExceptionInterface + * @throws NotFoundExceptionInterface */ - public function d3GetConfig(): Config + public function getSettingsService(): ModuleSettingServiceInterface { - return Registry::getConfig(); + return ContainerFactory::getInstance()->getContainer()->get(ModuleSettingServiceInterface::class); } public function getUserMessages(): ?string