/** * @param integer $id * @param integer[] $action */ public function tableDelete($id, $action) { if (is_array($action)) { foreach ($action as $item) { $this->tableDelete($item, null); } } else { try { $this->repository->getEntityManager()->remove($this->repository->find($id)); $this->repository->getEntityManager()->flush(); } catch (\Exception $e) { $this->onError($this, $e); } } $this->redirect('this'); $this->redrawControl('table'); }