/** * Remove inputsButton * * @param \VisualizationBundle\Entity\InputButton $inputsButton */ public function removeInputsButton(\VisualizationBundle\Entity\InputButton $inputsButton) { $this->inputs_button->removeElement($inputsButton); }
/** * Copy a InputButton entity. * * @Route("/{id}/copy", name="inputbutton_copy") * @param InputButton $inputButton * @return RedirectResponse */ public function copyAction(InputButton $inputButton) { $inputButton->getPage()->getId(); $inputButton_new = clone $inputButton; $em = $this->getDoctrine()->getManager(); $em->persist($inputButton_new); $em->flush(); return $this->redirectToRoute('inputbutton_edit', ['id' => $inputButton_new->getId()]); }