antpresta Posted March 13 Share Posted March 13 Bonjour à tous, J'essaie d'ajouter une action groupée sur la grille des commandes en administration (mon nouvel élément apparaît bien dans la liste des actions groupées) mais quand je clique dessus j'obtiens l'erreur : The controller for URI "/modules/bulkcustompdf" is not callable: Controller "Custompdf\Controller\Admin\AdminBulkPdfController" does neither exist as service nor as class. Voici le code que j'ai mis en place : public function hookActionOrderGridDefinitionModifier(array $params) { $params['definition']->getBulkActions()->add( (new SubmitBulkAction('custom_pdf_bulk_action')) ->setName('Générer') ->setOptions([ 'submit_route' => 'custom_pdf_bulk_action', ]) ); } et le routes.yml dans le dossier config custom_pdf_bulk_action: path: /bulkcustompdf methods: [GET, POST] defaults: _controller: Custompdf\Controller\Admin\AdminBulkPdfController::exportAction et le controller AdminBulkController.php <?php class AdminBulkPdfController extends ModuleAdminController { public function __construct() { parent::__construct(); } public function initContent() { echo 'test';die; } public function exportAction() { echo 'test';die; } } Merci ! Link to comment Share on other sites More sharing options...
CHRISCOM Posted 2 hours ago Share Posted 2 hours ago bonjour, vous avez fait un composer init ? pour initier un composer.json. Ensuite il faut ajouter le require once pour l'autoload.php. 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