diff --git a/Application/Controller/Admin/d3ActionWizard.php b/Application/Controller/Admin/d3ActionWizard.php index 28262f1..366e635 100644 --- a/Application/Controller/Admin/d3ActionWizard.php +++ b/Application/Controller/Admin/d3ActionWizard.php @@ -16,6 +16,7 @@ declare(strict_types=1); namespace D3\DataWizard\Application\Controller\Admin; use D3\DataWizard\Application\Model\Configuration; +use D3\DataWizard\Application\Model\Constants; use D3\DataWizard\Application\Model\Exceptions\DataWizardException; use D3\DataWizard\Application\Model\Exceptions\DebugException; use D3\DataWizard\Application\Model\Exceptions\InputUnvalidException; @@ -30,7 +31,7 @@ use Psr\Container\NotFoundExceptionInterface; class d3ActionWizard extends AdminDetailsController { - protected $_sThisTemplate = 'd3ActionWizard.tpl'; + protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3ActionWizard'; protected Configuration $configuration; @@ -50,7 +51,7 @@ class d3ActionWizard extends AdminDetailsController return $this->configuration->getActionGroups(); } - public function getGroupTasks($group) + public function getGroupTasks($group): array { return $this->configuration->getActionsByGroup($group); } diff --git a/Application/Controller/Admin/d3ExportWizard.php b/Application/Controller/Admin/d3ExportWizard.php index d7972ae..33c6c07 100644 --- a/Application/Controller/Admin/d3ExportWizard.php +++ b/Application/Controller/Admin/d3ExportWizard.php @@ -16,6 +16,7 @@ declare(strict_types=1); namespace D3\DataWizard\Application\Controller\Admin; use D3\DataWizard\Application\Model\Configuration; +use D3\DataWizard\Application\Model\Constants; use D3\DataWizard\Application\Model\Exceptions\DataWizardException; use D3\DataWizard\Application\Model\Exceptions\DebugException; use D3\DataWizard\Application\Model\Exceptions\NoSuitableRendererException; @@ -35,7 +36,7 @@ use Psr\Container\NotFoundExceptionInterface; class d3ExportWizard extends AdminDetailsController { - protected $_sThisTemplate = 'd3ExportWizard.tpl'; + protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3ExportWizard'; protected Configuration $configuration; @@ -56,7 +57,7 @@ class d3ExportWizard extends AdminDetailsController return $this->configuration->getExportGroups(); } - public function getGroupTasks($group) + public function getGroupTasks($group): array { return $this->configuration->getExportsByGroup($group); } diff --git a/Application/Model/Configuration.php b/Application/Model/Configuration.php index ff6e999..b2e241d 100644 --- a/Application/Model/Configuration.php +++ b/Application/Model/Configuration.php @@ -93,9 +93,9 @@ class Configuration /** * @param $group * - * @return mixed + * @return array */ - public function getActionsByGroup($group) + public function getActionsByGroup($group): array { return $this->actions[$group]; } @@ -103,9 +103,9 @@ class Configuration /** * @param $group * - * @return mixed + * @return array */ - public function getExportsByGroup($group) + public function getExportsByGroup($group): array { return $this->exports[$group]; } diff --git a/Application/Model/Constants.php b/Application/Model/Constants.php new file mode 100644 index 0000000..0e34a96 --- /dev/null +++ b/Application/Model/Constants.php @@ -0,0 +1,21 @@ + + * @link https://www.oxidmodule.com + */ + +declare(strict_types=1); + +namespace D3\DataWizard\Application\Model; + +class Constants +{ + public const OXID_MODULE_ID = 'd3datawizard'; +} diff --git a/metadata.php b/metadata.php index a28e771..8830f15 100644 --- a/metadata.php +++ b/metadata.php @@ -13,9 +13,8 @@ declare(strict_types=1); -/** - * Metadata version - */ +use D3\DataWizard\Application\Model\Constants; + $sMetadataVersion = '2.1'; $sModuleId = 'd3datawizard'; @@ -32,7 +31,7 @@ $aModule = [ 'en' => '', ], 'thumbnail' => 'picture.svg', - 'version' => '2.1.1.3', + 'version' => '3.0.0.0', 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', @@ -43,11 +42,11 @@ $aModule = [ 'extend' => [], 'events' => [], 'templates' => [ - 'd3ExportWizard.tpl' => 'd3/datawizard/Application/views/admin/tpl/d3ExportWizard.tpl', - 'd3ActionWizard.tpl' => 'd3/datawizard/Application/views/admin/tpl/d3ActionWizard.tpl', - 'd3Wizards.tpl' => 'd3/datawizard/Application/views/admin/tpl/inc/Wizards.tpl', - 'd3ExportSubmit.tpl' => 'd3/datawizard/Application/views/admin/tpl/inc/exportSubmit.tpl', - 'd3ActionSubmit.tpl' => 'd3/datawizard/Application/views/admin/tpl/inc/actionSubmit.tpl', + '@' . Constants::OXID_MODULE_ID . '/admin/d3ExportWizard.tpl' => 'views/smarty/admin/tpl/d3ExportWizard.tpl', + '@' . Constants::OXID_MODULE_ID . '/admin/d3ActionWizard.tpl' => 'views/smarty/admin/tpl/d3ActionWizard.tpl', + '@' . Constants::OXID_MODULE_ID . '/admin/inc/d3Wizards.tpl' => 'views/smarty/admin/tpl/inc/d3Wizards.tpl', + '@' . Constants::OXID_MODULE_ID . '/admin/inc/d3ExportSubmit.tpl' => 'views/smarty/admin/tpl/inc/exportSubmit.tpl', + '@' . Constants::OXID_MODULE_ID . '/admin/inc/d3ActionSubmit.tpl' => 'views/smarty/admin/tpl/inc/actionSubmit.tpl', ], 'settings' => [ [ diff --git a/Application/views/admin/tpl/d3ActionWizard.tpl b/views/smarty/admin/tpl/d3ActionWizard.tpl similarity index 92% rename from Application/views/admin/tpl/d3ActionWizard.tpl rename to views/smarty/admin/tpl/d3ActionWizard.tpl index e9e57d4..6152d29 100644 --- a/Application/views/admin/tpl/d3ActionWizard.tpl +++ b/views/smarty/admin/tpl/d3ActionWizard.tpl @@ -1,4 +1,4 @@ [{capture assign="d3dw_backgroundimage"}]linear-gradient(22.5deg, rgba(66, 66, 66, 0.02) 0%, rgba(66, 66, 66, 0.02) 11%,rgba(135, 135, 135, 0.02) 11%, rgba(135, 135, 135, 0.02) 24%,rgba(29, 29, 29, 0.02) 24%, rgba(29, 29, 29, 0.02) 38%,rgba(15, 15, 15, 0.02) 38%, rgba(15, 15, 15, 0.02) 50%,rgba(180, 180, 180, 0.02) 50%, rgba(180, 180, 180, 0.02) 77%,rgba(205, 205, 205, 0.02) 77%, rgba(205, 205, 205, 0.02) 100%),linear-gradient(67.5deg, rgba(10, 10, 10, 0.02) 0%, rgba(10, 10, 10, 0.02) 22%,rgba(52, 52, 52, 0.02) 22%, rgba(52, 52, 52, 0.02) 29%,rgba(203, 203, 203, 0.02) 29%, rgba(203, 203, 203, 0.02) 30%,rgba(69, 69, 69, 0.02) 30%, rgba(69, 69, 69, 0.02) 75%,rgba(231, 231, 231, 0.02) 75%, rgba(231, 231, 231, 0.02) 95%,rgba(138, 138, 138, 0.02) 95%, rgba(138, 138, 138, 0.02) 100%),linear-gradient(112.5deg, rgba(221, 221, 221, 0.02) 0%, rgba(221, 221, 221, 0.02) 17%,rgba(190, 190, 190, 0.02) 17%, rgba(190, 190, 190, 0.02) 39%,rgba(186, 186, 186, 0.02) 39%, rgba(186, 186, 186, 0.02) 66%,rgba(191, 191, 191, 0.02) 66%, rgba(191, 191, 191, 0.02) 68%,rgba(16, 16, 16, 0.02) 68%, rgba(16, 16, 16, 0.02) 70%,rgba(94, 94, 94, 0.02) 70%, rgba(94, 94, 94, 0.02) 100%),linear-gradient(90deg, #ffffff,#ffffff)[{/capture}] [{capture assign="d3dw_noitemmessageid"}]D3_DATAWIZARD_ERR_NOACTION_INSTALLED[{/capture}] -[{include file="d3Wizards.tpl" submit="d3ActionSubmit.tpl"}] +[{include file="@d3datawizard/admin/inc/d3Wizards.tpl" submit="@d3datawizard/admin/inc/d3ActionSubmit.tpl"}] diff --git a/Application/views/admin/tpl/d3ExportWizard.tpl b/views/smarty/admin/tpl/d3ExportWizard.tpl similarity index 88% rename from Application/views/admin/tpl/d3ExportWizard.tpl rename to views/smarty/admin/tpl/d3ExportWizard.tpl index 038b4b8..2cbe429 100644 --- a/Application/views/admin/tpl/d3ExportWizard.tpl +++ b/views/smarty/admin/tpl/d3ExportWizard.tpl @@ -1,4 +1,4 @@ [{capture assign="d3dw_backgroundimage"}]linear-gradient(339deg, rgba(47, 47, 47,0.02) 0%, rgba(47, 47, 47,0.02) 42%,transparent 42%, transparent 99%,rgba(17, 17, 17,0.02) 99%, rgba(17, 17, 17,0.02) 100%),linear-gradient(257deg, rgba(65, 65, 65,0.02) 0%, rgba(65, 65, 65,0.02) 11%,transparent 11%, transparent 92%,rgba(53, 53, 53,0.02) 92%, rgba(53, 53, 53,0.02) 100%),linear-gradient(191deg, rgba(5, 5, 5,0.02) 0%, rgba(5, 5, 5,0.02) 1%,transparent 1%, transparent 45%,rgba(19, 19, 19,0.02) 45%, rgba(19, 19, 19,0.02) 100%),linear-gradient(29deg, rgba(28, 28, 28,0.02) 0%, rgba(28, 28, 28,0.02) 33%,transparent 33%, transparent 40%,rgba(220, 220, 220,0.02) 40%, rgba(220, 220, 220,0.02) 100%),linear-gradient(90deg, rgb(255,255,255),rgb(255,255,255))[{/capture}] [{capture assign="d3dw_noitemmessageid"}]D3_DATAWIZARD_ERR_NOEXPORT_INSTALLED[{/capture}] -[{include file="d3Wizards.tpl" submit="d3ExportSubmit.tpl"}] +[{include file="@d3datawizard/admin/inc/d3Wizards.tpl" submit="@d3datawizard/admin/inc/d3ExportSubmit.tpl"}] diff --git a/Application/views/admin/tpl/inc/Wizards.tpl b/views/smarty/admin/tpl/inc/Wizards.tpl similarity index 99% rename from Application/views/admin/tpl/inc/Wizards.tpl rename to views/smarty/admin/tpl/inc/Wizards.tpl index f33bdf1..91c5854 100644 --- a/Application/views/admin/tpl/inc/Wizards.tpl +++ b/views/smarty/admin/tpl/inc/Wizards.tpl @@ -143,4 +143,4 @@ -[{include file="d3_cfg_mod_inc.tpl"}] \ No newline at end of file +[{include file="@d3modcfg_lib/admin/inc/inc.tpl"}] \ No newline at end of file diff --git a/Application/views/admin/tpl/inc/actionSubmit.tpl b/views/smarty/admin/tpl/inc/actionSubmit.tpl similarity index 100% rename from Application/views/admin/tpl/inc/actionSubmit.tpl rename to views/smarty/admin/tpl/inc/actionSubmit.tpl diff --git a/Application/views/admin/tpl/inc/exportSubmit.tpl b/views/smarty/admin/tpl/inc/exportSubmit.tpl similarity index 100% rename from Application/views/admin/tpl/inc/exportSubmit.tpl rename to views/smarty/admin/tpl/inc/exportSubmit.tpl