/**
  * Copy a GadgetClock entity.
  *
  * @Route("/{id}/copy", name="gadgetclock_copy")
  * @param GadgetClock $gadgetClock
  * @return RedirectResponse
  */
 public function copyAction(GadgetClock $gadgetClock)
 {
     $gadgetClock->getPage()->getId();
     $gadgetClock_new = clone $gadgetClock;
     $em = $this->getDoctrine()->getManager();
     $em->persist($gadgetClock_new);
     $em->flush();
     return $this->redirectToRoute('gadgetclock_edit', ['id' => $gadgetClock_new->getId()]);
 }
예제 #2
0
 /**
  * Remove gadgetsClock
  *
  * @param \VisualizationBundle\Entity\GadgetClock $gadgetsClock
  */
 public function removeGadgetsClock(\VisualizationBundle\Entity\GadgetClock $gadgetsClock)
 {
     $this->gadgets_clock->removeElement($gadgetsClock);
 }