Controller/DataGridController.php
public function massAction ($name)
    {          
        $dataGrid = $this->getDataGrid($name);
        
        $action = $this->getRequest()->get('action');
        
        if (!$action){
            throw new \InvalidArgumentException('Parameter "action" in not valid'); 
        }
        
        $handler = $this->container->get('neutron_data_grid.handler.datagrid');
        $handler
            ->setDataGrid($dataGrid)
            ->resolveOptions($this->getRequestParameters())
            ->buildQuery()
        ;
        
        $ids = $this->getRequest()->get('ids', array());
        $selectAll = ($this->getRequest()->get('selectAll') === 'true');

        $event = new MassActionEvent($name, $action, $ids, $selectAll, $handler->getQuery());
        $this->container->get('event_dispatcher')->dispatch(DataGridEvents::onMassAction, $event);
        
        return new JsonResponse($event->getExtraData());
    }
public function massAction ($name)
    {          
        $dataGrid = $this->getDataGrid($name);
        
        $action = $this->getRequest()->get('action');
        
        if (!$action){
            throw new \InvalidArgumentException('Parameter "action" in not valid'); 
        }
        
        $handler = $this->container->get('neutron_data_grid.handler.datagrid');
        $handler
            ->setDataGrid($dataGrid)
            ->resolveOptions($this->getRequestParameters())
            ->buildQuery()
        ;
        
        $ids = $this->getRequest()->get('ids', array());
        $selectAll = ($this->getRequest()->get('selectAll') === 'true');

        $event = new MassActionEvent($name, $action, $ids, $selectAll, $handler->getQuery());
        $this->container->get('event_dispatcher')->dispatch(DataGridEvents::onMassAction, $event);
        
        return new JsonResponse($event->getExtraData());
    }
public function massAction ( $ name ) { $ dataGrid = $ this -> getDataGrid ( $ name ) ; $ action = $ this -> getRequest ( ) -> get ( 'action' ) ; if ( ! $ action ) { throw new \ InvalidArgumentException ( 'Parameter "action" in not valid' ) ; } $ handler = $ this -> container -> get ( 'neutron_data_grid.handler.datagrid' ) ; $ handler -> setDataGrid ( $ dataGrid ) -> resolveOptions ( $ this -> getRequestParameters ( ) ) -> buildQuery ( ) ; $ ids = $ this -> getRequest ( ) -> get ( 'ids' , array ( ) ) ; $ selectAll = ( $ this -> getRequest ( ) -> get ( 'selectAll' ) === 'true' ) ; $ event = new MassActionEvent ( $ name , $ action , $ ids , $ selectAll , $ handler -> getQuery ( ) ) ; $ this -> container -> get ( 'event_dispatcher' ) -> dispatch ( DataGridEvents :: onMassAction , $ event ) ; return new JsonResponse ( $ event -> getExtraData ( ) ) ; }
This action handles mass actions

@param string $name
@return \Symfony\Component\HttpFoundation\Response
This action handles mass actions