Пример #1
0
 /**
  * Remove panelsText
  *
  * @param \VisualizationBundle\Entity\PanelText $panelsText
  */
 public function removePanelsText(\VisualizationBundle\Entity\PanelText $panelsText)
 {
     $this->panels_text->removeElement($panelsText);
 }
 /**
  * Copy a PanelText entity.
  *
  * @Route("/{id}/copy", name="paneltext_copy")
  * @param PanelText $panelText
  * @return RedirectResponse
  */
 public function copyAction(PanelText $panelText)
 {
     $panelText->getPage()->getId();
     $panelText_new = clone $panelText;
     $em = $this->getDoctrine()->getManager();
     $em->persist($panelText_new);
     $em->flush();
     return $this->redirectToRoute('paneltext_edit', ['id' => $panelText_new->getId()]);
 }