I have a project with symfony 2 and im using a SonataAdminBundle for my backend. How can i override a dashboardAction() to extend them for more features ?
I have a project with symfony 2 and im using a SonataAdminBundle for my
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The routing configuration for this sonata admin can be found in
Let say you have a bundle named ‘My/AdminBundle’ that holds the controller that should extend the dashboardActions. Then try the following:
Create a controller in /My/AdminBundle/Controller/CoreController.php
Open the bundle routing configuration file located /My/AdminBundle/Resources/config/routing.yml (you might have different configuration format such as xml)
sonata_admin_dashboard: pattern: /dashboard defaults: { _controller: MyAdminBundle:Core:dashboard }admin: resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml' prefix: /admin _sonata_admin: resource: . type: sonata_admin prefix: /admin MyAdminBundle: resource: "@MyAdminBundle/Resources/config/routing.yml" prefix: /adminDisclaimer just so you know I have not used this in a project. I just check it locally and it worked. It is possible that this is not the best solution!
Hope this helps