/** * @Route("/contrat/{id}/copie", name="contrat_copie") * @ParamConverter("contrat", class="AppBundle:Contrat") */ public function copieAction(Request $request, Contrat $contrat) { $dm = $this->get('doctrine_mongodb')->getManager(); $contratReconduit = $contrat->copier(); $dm->persist($contratReconduit); $dm->flush(); return $this->redirectToRoute('contrat_acceptation', array('id' => $contratReconduit->getId())); }