isMethod('POST')) { $this->entityManager->remove($application); $this->entityManager->flush(); $this->eventDispatcher->dispatch( new ApplicationDeletedEvent($application), ApplicationDeletedEvent::NAME ); return new HxRedirectResponse($this->getReturnUrl($request, 'app_teamer_index')); } return $this->render('teamer/application/modal_withdraw.html.twig', [ 'application' => $application, ]); } }