Пример #1
0
 /**
  * @Route("/post/{id}")
  * @Template()
  */
 public function indexAction($id)
 {
     $post = new Post();
     $post->setName('Александр');
     $post->setPhone('097 758 11 54');
     $post->setEmail('*****@*****.**');
     $post->setProduct('phone Elari (red)');
     $post->setPrice(1389);
     $post->setPlace('Харьков');
     $post->setTransport("novapochta");
     $post->setPayMethod("cache");
     $this->em->persist($post);
     $this->em->flush();
     return $this->templating->renderResponse('Post/index.html.twig', array('post' => $post));
 }
 /**
  * Updates an existing Organization
  *
  * @param Organization $org
  * @return void
  */
 public function update(Organization $org)
 {
     $this->em->persist($org);
     $this->em->flush();
 }
Пример #3
0
 /**
  * Updates an existing User
  *
  * @param User $user
  * @return void
  */
 public function update(User $user)
 {
     $this->em->persist($user);
     $this->em->flush();
 }