Пример #1
0
 /**
  * @Route("{id}/editando-usuario/", name="adGt-gestEditUsers", options={"expose":true})
  * @ParamConverter("user", class="AppBundle:Users", options={"mapping":{"id":"id"}})
  * @Method({"POST"})
  */
 public function gestEditUserAction(\AppBundle\Entity\Users $user)
 {
     $newObj = array();
     if ($user) {
         $newObj['id'] = $user->getId();
         $newObj['username'] = $user->getUsername();
         $newObj['email'] = $user->getEmail();
     }
     $respuesta = new \Symfony\Component\HttpFoundation\JsonResponse();
     return $respuesta->setData($newObj);
 }