コード例 #1
0
ファイル: Page.php プロジェクト: ZajdeR/bmsonline-client
 /**
  * Remove inputsButton
  *
  * @param \VisualizationBundle\Entity\InputButton $inputsButton
  */
 public function removeInputsButton(\VisualizationBundle\Entity\InputButton $inputsButton)
 {
     $this->inputs_button->removeElement($inputsButton);
 }
コード例 #2
0
 /**
  * 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()]);
 }