public function load(ObjectManager $manager) { $userAdmin = new User(); $userAdmin->setUsername('admin'); $userAdmin->setPrenomUtilisateur('admin'); $userAdmin->setNomUtilisateur('admin'); $userAdmin->setSexeUtilisateur('M'); $userAdmin->setPassword('test'); $userAdmin->setEmail('*****@*****.**'); $manager->persist($userAdmin); $manager->flush(); }
/** * Creates a form to delete a User entity. * * @param User $user The User entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(User $user) { return $this->createFormBuilder()->setAction($this->generateUrl('user_delete', array('id' => $user->getId())))->setMethod('DELETE')->getForm(); }