Jump to content

Edit History

damian_pm

damian_pm

src/ can be override in module for example class /src/Adapter/PDF/OrderInvoicePdfGenerator.php:

 

file1: /modules/someModule/src/OrderInvoicePdfGenerator.php

-- copy of file OrderInvoicePdfGenerator.php and changed namespace to  PrestaShop\Module\someModule\Controller;

 

file2: /modules/someModul/config/services.yml:

services:
    _defaults:
      public: true
    prestashop.adapter.pdf.order_invoice_pdf_generator:
      class: PrestaShop\Module\someModule\Controller\OrderInvoicePdfGenerator
      arguments:
        - '@translator'

file3: /modules/someModul/composer.json

    "autoload": {
        "psr-4": {
            "PrestaShop\\Module\\someModule\\": "src/"
          },
...

 

damian_pm

damian_pm

src/ can be override in module for example class /src/Adapter/PDF/OrderInvoicePdfGenerator.php:

 

file1: /modules/someModule/src/OrderInvoicePdfGenerator.php

-- copy of file OrderInvoicePdfGenerator.php and changed namespace to  PrestaShop\Module\someModule\Controller;

 

file2: /modules/someModul/config/services.yml:

services:
    _defaults:
      public: true
    prestashop.adapter.pdf.order_invoice_pdf_generator:
      class: PrestaShop\Module\someModule\Controller\OrderInvoicePdfGenerator
      arguments:
        - '@translator'

 

damian_pm

damian_pm

src/ can be override in module for example class /src/Adapter/PDF/OrderInvoicePdfGenerator.php:

 

file1: /modules/someModule/src/OrderInvoicePdfGenerator.php

-- copy of file OrderInvoicePdfGenerator.php

 

file2: /modules/someModul/config/services.yml:

services:
    _defaults:
      public: true
    prestashop.adapter.pdf.order_invoice_pdf_generator:
      class: PrestaShop\Module\someModule\Controller\OrderInvoicePdfGenerator
      arguments:
        - '@translator'

 

×
×
  • Create New...