refactor to composer api

Non working state
This commit is contained in:
Walz
2025-04-08 16:08:09 +02:00
parent 20eacdf96c
commit 1b27d03c4d
12 changed files with 405 additions and 38 deletions

7
config/routes.yml Normal file
View File

@ -0,0 +1,7 @@
gdpr_cookie_consent_configuration:
path: /gdprcookieconsent/configuration
methods: [GET, POST]
defaults:
_controller: 'PrestaShop\Module\GdprCookieConsent\Controller\GdprConfigurationController::indexAction'
_legacy_controller: AdminGdprCookieConsent
_legacy_link: AdminGdprCookieConsent

34
config/services.yml Normal file
View File

@ -0,0 +1,34 @@
services:
_defaults:
public: true
autowire: true
autoconfigure: true
# Form Type
prestashop.module.gdprcookieconsent.form.type.gdpr_configuration:
class: 'PrestaShop\Module\GdprCookieConsent\Form\GdprConfigurationFormType'
parent: 'form.type.translatable.aware'
public: true
tags:
- { name: form.type }
# Data Configuration
prestashop.module.gdprcookieconsent.form.gdpr_configuration_data_configuration:
class: PrestaShop\Module\GdprCookieConsent\Form\GdprConfigurationDataConfiguration
arguments: ['@prestashop.adapter.legacy.configuration']
# Form Data Provider
prestashop.module.gdprcookieconsent.form.gdpr_configuration_form_data_provider:
class: 'PrestaShop\Module\GdprCookieConsent\Form\GdprConfigurationFormDataProvider'
arguments:
- '@prestashop.module.gdprcookieconsent.form.gdpr_configuration_data_configuration'
# Form Handler
prestashop.module.gdprcookieconsent.form.gdpr_configuration_form_data_handler:
class: 'PrestaShop\PrestaShop\Core\Form\Handler'
arguments:
- '@form.factory'
- '@prestashop.core.hook.dispatcher'
- '@prestashop.module.gdprcookieconsent.form.gdpr_configuration_form_data_provider'
- 'PrestaShop\Module\GdprCookieConsent\Form\GdprConfigurationFormType'
- 'Configuration'