1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
public function profileUserAction(request $request)
{
$title = array('title' => 'Profil');
// Récupération de l'entité manager
$em = $this->getDoctrine()->getManager();
// Récupère l'objet User courant
$objUser = $this->getUser();
$Username = $this->getUser()->getUsername();
// création form pour modal
$form = $this->createForm(userType::class, $objUser);
$form->handleRequest($request);
// retourne un array avec toutes les données
return $this->render('jobroomBundle:profile:profile.html.twig', array(
// User Actif
'User' => $objUser,
'form' => $form->createView(),
'title' => $title,
'username' => $Username
));
} |
Partager