FabiusM Posted June 28, 2022 Share Posted June 28, 2022 Salve, dovrei implementare ed estendere il controller ordini in backend... di seguito il contesto... composer.json { "name" : "author/mymodule", "autoload" : { "psr-4" : {"Namespace1\\" : "src/"}, "classmap": ["mymodule.php"], "config": {"prepend-autoloader" : false}, "type" : "prestashop-module" } } routes.yml admin_orders_index: path: /sell/orders/ methods: [GET, POST] defaults: _controller: 'Namespace1\Controller\Admin\DemoController::indexAction' _legacy_controller: 'AdminOrders' _legacy_link: 'AdminOrders' _disable_module_prefix: true DemoController.php declare(strict_types=1); namespace NameSpace1\Controller\Admin; use PrestaShopBundle\Controller\Admin\FrameworkBundleAdminController; use Symfony\Component\HttpFoundation\Request; class DemoController extends FrameworkBundleAdminController { public function indexAction(Request $request) { //write your action to be done echo "CIAO"; } } dopo aver installato le dipendeze con composer ed eliminato la cache mi risulta questo errore The controller for URI "/sell/orders/" is not callable: Class "EngFatturazione\Controller\Admin\DemoController" does not exist. Dove sbaglio? Grazie mille! Link to comment Share on other sites More sharing options...
andsigno82 Posted June 9, 2023 Share Posted June 9, 2023 Ciao! io ho lo stesso errore. sei poi riuscito a risolvere? come è possibile che non si trovi letteratura di questo errore? ho seguito i passi della guida ufficiale, uno dopo l'altro... Link to comment Share on other sites More sharing options...
andsigno82 Posted June 12, 2023 Share Posted June 12, 2023 Documentazione assolutamente carente sotto tutti i punti di vista. non dice che il file services.yml è necessario, altrimenti non funziona assolutamente nulla. in tuomodulo/config/admin/services.yml services: # The name of the service must match the full namespace class TuoModulo\Controller\DemoController: class: TuoModulo\Controller\DemoController tags: ['controller.service_arguments'] arguments: - '@doctrine.cache.provider' Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now