title: Custom batch action in Sonata Admin
body: <p>I've posted this 3 times already and cannot seem to see the post don't know what I am doing wrong.</p>
  
  <p>I've created my batch action my my admin class as below:</p>
  
  <pre><code>namespace ACME\MyBundle\Admin;
  
  use Sonata\AdminBundle\Admin\Admin;
  use Sonata\AdminBundle\Show\ShowMapper;
  use Sonata\AdminBundle\Datagrid\ListMapper;
  use Sonata\AdminBundle\Datagrid\DatagridMapper;
  use Sonata\AdminBundle\Validator\ErrorElement;
  use Sonata\AdminBundle\Route\RouteCollection;
  
  class JournalistProfileAdmin extends Admin
  {
    ...........
    ...........
      public function getBatchActions()
  {
  
      $lists = $this-&gt;getModelManager()-&gt;createQuery('ACME\MyBundle\Entity\ContactList', 'c')-&gt;execute();
      $listsArray = array();
  
      foreach ($lists as $list)
      {
          $listsArray[$list-&gt;getId()] = $list-&gt;getName();
      }
      $actions = parent::getBatchActions();
  
      $actions['addToGroup'] = array(
              'label' =&gt; $this-&gt;trans('action_add_to_group', array(), 'SonataAdminBundle'),
              'ask_confirmation' =&gt; true,
              'secondary' =&gt; $listsArray,
          );
  
      return $actions;
  }
  }
  </code></pre>
  
  <p>Then extended the CRUDController as in the file below:</p>
  
  <pre><code>namespace ACME\MyBundle\Controller;
  
  use Sonata\AdminBundle\Controller\CRUDController as Controller;
  use Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery as ProxyQueryInterface;
  use Symfony\Component\HttpFoundation\RedirectResponse;
  
  class JournalistProfileAdminController extends Controller
  {
    public function batchActionAddToIsRelevant()
      {
          return true;
      }
      public function batchActionAddToGroup(ProxyQueryInterface $selectedModelQuery)
       {
          ........................
        ...........................
      }
  </code></pre>
  
  <p>When I try to run my batch action, I get <i>Sonata\AdminBundle\Controller\CRUDController::batchActionAddToGroup method must be created </i> error.</p>
  
  <p>Can anyone please help?</p>