public function deleteAction(Request $request, $name, $id) {

        $dtProvider = $this->getDataTablesProvider($name);

        try {

            $entity = $this->getDataTablesEntityById($dtProvider, $id);

            $this->dispatchDataTablesEvent(DataTablesEvents::DATATABLES_PRE_DELETE, [$entity]);

            $em = $this->getDoctrine()->getManager();
            $em->remove($entity);
            $em->flush();

            $this->dispatchDataTablesEvent(DataTablesEvents::DATATABLES_POST_DELETE, [$entity]);

            $output = $this->prepareActionResponse(200, "DataTablesController.deleteAction.success");
        } catch (Exception $ex) {

            $output = $this->handleDataTablesException($ex, "DataTablesController.deleteAction");
        }

        return $this->buildDataTablesResponse($request, $name, $output);
    }