public function removeAction(Request $request)
    {
        $row = $this->findRowByRequest($request);
        $container = $row->getContainer();

        try {
            $this->getEditor()->getRowManager()->delete($row);
        } catch (EditorExceptionInterface $e) {
            return $this->handleException($e);
        }

        // Stores id for front removal
        $removedId = $this->getViewBuilder()->buildRow($row)->getAttributes()->getId();

        $this->validate($container);
        $this->persist($container);

        $data = [
            'removed' => [$removedId],
            //'containers' => [$this->getViewBuilder()->buildContainer($container)],
        ];

        return $this->buildResponse($data, self::SERIALIZE_LAYOUT);
    }
public function removeAction(Request $request)
    {
        $row = $this->findRowByRequest($request);
        $container = $row->getContainer();

        try {
            $this->getEditor()->getRowManager()->delete($row);
        } catch (EditorExceptionInterface $e) {
            return $this->handleException($e);
        }

        // Stores id for front removal
        $removedId = $this->getViewBuilder()->buildRow($row)->getAttributes()->getId();

        $this->validate($container);
        $this->persist($container);

        $data = [
            'removed' => [$removedId],
            //'containers' => [$this->getViewBuilder()->buildContainer($container)],
        ];

        return $this->buildResponse($data, self::SERIALIZE_LAYOUT);
    }
public function removeAction ( Request $ request ) { $ row = $ this -> findRowByRequest ( $ request ) ; $ container = $ row -> getContainer ( ) ; try { $ this -> getEditor ( ) -> getRowManager ( ) -> delete ( $ row ) ; } catch ( EditorExceptionInterface $ e ) { return $ this -> handleException ( $ e ) ; } // Stores id for front removal $ removedId = $ this -> getViewBuilder ( ) -> buildRow ( $ row ) -> getAttributes ( ) -> getId ( ) ; $ this -> validate ( $ container ) ; $ this -> persist ( $ container ) ; $ data = [ 'removed' => [ $ removedId ] , //'containers' => [$this->getViewBuilder()->buildContainer($container)], ] ; return $ this -> buildResponse ( $ data , self :: SERIALIZE_LAYOUT ) ; }
Remove the row.

@param Request $request

@return \Symfony\Component\HttpFoundation\Response
Remove the row .