Vincent Decaux Posted August 11 Share Posted August 11 Bonjour à tous, j'essaie de développer un module pour Prestashop 8/9, donc avec les Controller Symfony. Voici le contenu d'un de mes Controller : namespace PrestaShop\Module\MyCustom\Controller; if (!defined('_PS_VERSION_')) { exit; } class MyCustomLoginAdminController extends AbstractMyCustomAdminController { public function indexAction(Request $request) { .... } } Avec : namespace PrestaShop\Module\MyCustom\Controller; if (!defined('_PS_VERSION_')) { exit; } use PrestaShopBundle\Controller\Admin\FrameworkBundleAdminController; abstract class AbstractMyCustomAdminController extends FrameworkBundleAdminController { .... } Voici mon routes.yaml : mycustom_login: path: mycustom/login methods: [GET, POST] defaults: _controller: MyCustom\Controller\MyCustomLoginAdminController::indexAction _legacy_controller: 'MyCustomLoginAdminController' _legacy_link: 'MyCustomLoginAdminController' Et mon composer.json : "autoload": { "psr-4": { "PrestaShop\\Module\\MyCustom\\": "src/" } }, Tout me parait bon, malgré cela, j'ai cette erreur : Quote The controller for URI "/modules/mycustom/login" is not callable: Controller "MyCustom\Controller\MyCustomLoginAdminController" does neither exist as service nor as class. Que faut-il configurer de plus ? j'ai copié / collé le BlockWishList, suivi la doc, vidé le cache. Je vous remercie. Link to comment Share on other sites More sharing options...
WEB-FUSION Posted Friday at 04:55 PM Share Posted Friday at 04:55 PM bonjour @Vincent Decaux vous avez générer les vendors ? 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