From be1a961f88a57d9fa0f52d32fab99e4102f44f41 Mon Sep 17 00:00:00 2001 From: MaxBuhe01 Date: Thu, 22 Aug 2024 20:08:00 +0200 Subject: [PATCH] [Changed] general structure to OXID7 Standard ( Metadata, Composer, Constants ) --- Application/Model/Constants.php | 11 +++++ composer.json | 11 +++-- metadata.php | 74 ++++++++++++++++++--------------- 3 files changed, 56 insertions(+), 40 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..df3c821 --- /dev/null +++ b/Application/Model/Constants.php @@ -0,0 +1,11 @@ +'; -$sModuleId = 'd3PdfDocuments'; /** * Module information */ $aModule = [ - 'id' => $sModuleId, + 'id' => Constants::OXID_MODULE_ID, 'title' => [ 'de' => $logo.' PDF-Dokumente', 'en' => $logo.' PDF documents', ], - 'version' => '1.0.4.0', - 'author' => 'D³ Data Development (Inh.: Thomas Dartsch)', + 'version' => '2.0.0', + 'author' => $logo.' Data Development (Inh.: Thomas Dartsch)', 'email' => 'support@shopmodule.com', 'url' => 'https://www.oxidmodule.com/', 'extend' => [ @@ -38,51 +38,57 @@ $aModule = [ 'controllers' => [], 'thumbnail' => 'picture.svg', 'templates' => [ - 'd3orderoverview_pdfform.tpl' => 'd3/pdfdocuments/Application/views/tpl/admin/orderoverview_pdfform.tpl', + //Admin + '@' . Constants::OXID_MODULE_ID . '/admin/d3orderoverview_pdfform.tpl' => 'views/smarty/admin/orderoverview_pdfform.tpl', - 'd3deliverynote_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynote.tpl', - 'd3deliverynoteNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/deliverynoteNoLogo.tpl', - 'd3delnote_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/informations.tpl', - 'd3delnote_pdf_recipient.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/recipientAddress.tpl', - 'd3delnote_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/salutation.tpl', - 'd3delnote_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/deliverynote/inc/conclusion.tpl', + // Frontend - Flow - Deliverynote + '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3deliverynote_pdf.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynote.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3deliverynoteNoLogo_pdf.tpl' => 'views/smarty/flow/documents/deliverynote/deliverynoteNoLogo.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_informations.tpl' => 'views/smarty/flow/documents/deliverynote/inc/informations.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_recipient.tpl' => 'views/smarty/flow/documents/deliverynote/inc/recipientAddress.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_salutation.tpl' => 'views/smarty/flow/documents/deliverynote/inc/salutation.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/deliverynote/d3delnote_pdf_conclusion.tpl' => 'views/smarty/flow/documents/deliverynote/inc/conclusion.tpl', - 'd3invoice_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoice.tpl', - 'd3invoiceNoLogo_pdf.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/invoiceNoLogo.tpl', - 'd3invoice_pdf_informations.tpl'=> 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/informations.tpl', - 'd3invoice_pdf_salutation.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/salutation.tpl', - 'd3invoice_pdf_conclusion.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/conclusion.tpl', - 'd3invoice_pdf_payinfo.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/invoice/inc/payinfo.tpl', + // Frontend - Flow - Invoice + '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf.tpl' => 'views/smarty/flow/documents/invoice/invoice.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoiceNoLogo_pdf.tpl' => 'views/smarty/flow/documents/invoice/invoiceNoLogo.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_informations.tpl' => 'views/smarty/flow/documents/invoice/inc/informations.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_salutation.tpl' => 'views/smarty/flow/documents/invoice/inc/salutation.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_conclusion.tpl' => 'views/smarty/flow/documents/invoice/inc/conclusion.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/invoice/d3invoice_pdf_payinfo.tpl' => 'views/smarty/flow/documents/invoice/inc/payinfo.tpl', - 'd3pdfbase.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/base.tpl', - 'd3pdfheader.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/header.tpl', - 'd3pdffooter.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/footer.tpl', - 'd3pdfreturnaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/page/returnaddress.tpl', + // Frontend - Flow - Inc - Page + '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/d3pdfbase.tpl' => 'views/smarty/flow/documents/inc/page/base.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/d3pdfheader.tpl' => 'views/smarty/flow/documents/inc/page/header.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/d3pdffooter.tpl' => 'views/smarty/flow/documents/inc/page/footer.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/page/d3pdfreturnaddress.tpl' => 'views/smarty/flow/documents/inc/page/returnaddress.tpl', - 'd3pdfaddressarea.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/addressarea.tpl', - 'd3pdfrecipientaddress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/recipientAddress.tpl', - 'd3pdfinformations.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/informations.tpl', - 'd3pdfdeladdress.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/deliveryaddress.tpl', - 'd3pdfarticlelist.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlelist.tpl', - 'd3pdfarticlecostsummary.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/articlecostssummary.tpl', - 'd3pdffoldmarks.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/elements/foldmarks.tpl', + // Frontend - Flow - Inc - Elements + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdfaddressarea.tpl' => 'views/smarty/flow/documents/inc/elements/addressarea.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdfrecipientaddress.tpl' => 'views/smarty/flow/documents/inc/elements/recipientAddress.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdfinformations.tpl' => 'views/smarty/flow/documents/inc/elements/informations.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdfdeladdress.tpl' => 'views/smarty/flow/documents/inc/elements/deliveryaddress.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdfarticlelist.tpl' => 'views/smarty/flow/documents/inc/elements/articlelist.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdfarticlecostsummary.tpl' => 'views/smarty/flow/documents/inc/elements/articlecostssummary.tpl', + '@' . Constants::OXID_MODULE_ID . '/documents/inc/elements/d3pdffoldmarks.tpl' => 'views/smarty/flow/documents/inc/elements/foldmarks.tpl', - 'd3pdfstyles.css' => 'd3/pdfdocuments/out/src/css/pdfStyling.css', - - 'd3pdfrulers.tpl' => 'd3/pdfdocuments/Application/views/tpl/documents/inc/helper/rulers.tpl', + // Frontend - Flow - Inc - Helper + '@' . Constants::OXID_MODULE_ID . '/documents/inc/helper/d3pdfrulers.tpl' => 'views/smarty/flow/documents/inc/helper/rulers.tpl', + + //'@' . Constants::self::OXID_MODULE_ID . 'd3pdfstyles.css' => 'CHECKEN!d3/pdfdocuments/out/src/css/pdfStyling.css', ], 'events' => [], 'blocks' => [ [ 'template' => 'order_overview.tpl', 'block' => 'admin_order_overview_export', - 'file' => 'Application/views/admin/blocks/order_overview.tpl' + 'file' => 'views/smarty/blocks/blocks/order_overview.tpl' ] ], 'settings' => [ [ - 'group' => $sModuleId.'main', - 'name' => $sModuleId.'bDev', + 'group' => Constants::OXID_MODULE_ID.'main', + 'name' => Constants::OXID_MODULE_ID.'bDev', 'type' => 'bool', 'value' => false ]