Controller/DataGridController.php
public function rowAction ($name)
    {
        $oper = $this->getRequest()->get('oper', false);
        if (!in_array($oper, array('add', 'edit', 'del'))){
            throw new \InvalidArgumentException(sprintf('Event type: %s is not valid', $oper));
        }
        
        $eventType = 'neutron_datagrid.onRow' . ucfirst($oper);
        
        $event = new RowEvent($name, $this->getRequest()->get('id'));

        $this->container->get('event_dispatcher')->dispatch($eventType, $event);
        
        return new JsonResponse(array(
            'errors'  => $event->getErrors(), 
            'success' => $event->getSuccess(), 
            'id'      => $event->getId(),
            'data'    => $event->getData()
        ));
    }
public function rowAction ($name)
    {
        $oper = $this->getRequest()->get('oper', false);
        if (!in_array($oper, array('add', 'edit', 'del'))){
            throw new \InvalidArgumentException(sprintf('Event type: %s is not valid', $oper));
        }
        
        $eventType = 'neutron_datagrid.onRow' . ucfirst($oper);
        
        $event = new RowEvent($name, $this->getRequest()->get('id'));

        $this->container->get('event_dispatcher')->dispatch($eventType, $event);
        
        return new JsonResponse(array(
            'errors'  => $event->getErrors(), 
            'success' => $event->getSuccess(), 
            'id'      => $event->getId(),
            'data'    => $event->getData()
        ));
    }
public function rowAction ( $ name ) { $ oper = $ this -> getRequest ( ) -> get ( 'oper' , false ) ; if ( ! in_array ( $ oper , array ( 'add' , 'edit' , 'del' ) ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Event type: %s is not valid' , $ oper ) ) ; } $ eventType = 'neutron_datagrid.onRow' . ucfirst ( $ oper ) ; $ event = new RowEvent ( $ name , $ this -> getRequest ( ) -> get ( 'id' ) ) ; $ this -> container -> get ( 'event_dispatcher' ) -> dispatch ( $ eventType , $ event ) ; return new JsonResponse ( array ( 'errors' => $ event -> getErrors ( ) , 'success' => $ event -> getSuccess ( ) , 'id' => $ event -> getId ( ) , 'data' => $ event -> getData ( ) ) ) ; }
This action handles manipulating of record

@param string $name
@return \Symfony\Component\HttpFoundation\Response
This action handles manipulating of record