symfonysonata-adminsymfony-sonatasonata-user-bundle

Customize Sonata-admin dashboard "home"


I'm quite new to the Sonata project, and as "playing" with it, I wanted to use it for one of my projects.

But there are a few questions that still remains for me about Sonata and the way it works and can be customized.

Here are they :


Solution

  • In symfony you can customize third party bundle by inheriting that bundle. So to use your own controller do the followings step by step:

    In your custom bundle: AcmeDemoBundle.php add:

    public function getParent()
    {
        return 'SonataAdminBundle';
    }
    

    Now your bundle is inheriting SonataAdminBundle.

    In your custom controller: AcmeDemoBundleCustomController.php

    class CustomController extends CoreController {
    
      public function dashboardAction()
      {
          ...
          /* Here goes your code */
      }
    
    }