From 13f80493944dc7f7298f6642dacda8c43e9b8b93 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Tue, 27 Apr 2021 23:51:12 +0200 Subject: [PATCH] example exports can hidden --- src/Application/Model/Configuration.php | 5 ++++- src/Application/views/admin/de/d3DataWizard_lang.php | 1 + src/metadata.php | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Application/Model/Configuration.php b/src/Application/Model/Configuration.php index b212ec7..4dde3e9 100644 --- a/src/Application/Model/Configuration.php +++ b/src/Application/Model/Configuration.php @@ -16,6 +16,7 @@ declare(strict_types=1); namespace D3\DataWizard\Application\Model; use D3\DataWizard\Application\Model\Exports\InactiveCategories; +use OxidEsales\Eshop\Core\Registry; class Configuration { @@ -34,7 +35,9 @@ class Configuration public function configure() { - $this->registerExport(self::GROUP_CATEGORY, oxNew(InactiveCategories::class)); + if (false === Registry::getConfig()->getConfigParam('d3datawizard_hideexamples', false)) { + $this->registerExport(self::GROUP_CATEGORY, oxNew(InactiveCategories::class)); + } } /** diff --git a/src/Application/views/admin/de/d3DataWizard_lang.php b/src/Application/views/admin/de/d3DataWizard_lang.php index 38d1fc2..b807e8e 100644 --- a/src/Application/views/admin/de/d3DataWizard_lang.php +++ b/src/Application/views/admin/de/d3DataWizard_lang.php @@ -26,6 +26,7 @@ $aLang = array( 'SHOP_MODULE_GROUP_d3datawizard_general' => 'Grundeinstellungen', 'SHOP_MODULE_d3datawizard_debug' => 'zeigt Abfragen anstatt diese auszuführen', + 'SHOP_MODULE_d3datawizard_hideexamples' => 'Beispielexporte ausblenden', 'D3_DATAWIZARD_GROUP_ARTICLES' => 'Artikel', 'D3_DATAWIZARD_GROUP_CATEGORIES' => 'Kategorien', diff --git a/src/metadata.php b/src/metadata.php index bba10be..6d5f73c 100644 --- a/src/metadata.php +++ b/src/metadata.php @@ -51,6 +51,12 @@ $aModule = [ 'type' => 'bool', 'value' => false ], + [ + 'group' => $sModuleId.'_general', + 'name' => $sModuleId.'_hideexamples', + 'type' => 'bool', + 'value' => false + ], ], 'blocks' => [] ];