/**
  * Copy a InputNumber entity.
  *
  * @Route("/{id}/copy", name="inputnumber_copy")
  * @param InputNumber $inputNumber
  * @return RedirectResponse
  */
 public function copyAction(InputNumber $inputNumber)
 {
     $inputNumber->getPage()->getId();
     $inputNumber_new = clone $inputNumber;
     $em = $this->getDoctrine()->getManager();
     $em->persist($inputNumber_new);
     $em->flush();
     return $this->redirectToRoute('inputnumber_edit', ['id' => $inputNumber_new->getId()]);
 }
Exemplo n.º 2
0
 /**
  * Remove inputsNumber
  *
  * @param \VisualizationBundle\Entity\InputNumber $inputsNumber
  */
 public function removeInputsNumber(\VisualizationBundle\Entity\InputNumber $inputsNumber)
 {
     $this->inputs_number->removeElement($inputsNumber);
 }