/**
  * {@inheritDoc}
  */
 public function setNiveau($niveau)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setNiveau', array($niveau));
     return parent::setNiveau($niveau);
 }
 public function ajouterNiveauAction(Request $request)
 {
     if ($request->isXmlHttpRequest()) {
         $libelle = $request->request->get('niveau');
         $niveau = new Niveau();
         $niveau->setNiveau($libelle);
         $em = $this->getDoctrine()->getManager();
         $em->persist($niveau);
         $em->flush();
         $niveaux = $this->getDoctrine()->getRepository('AERGUSassociationBundle:Niveau')->findAll();
         return $this->render('AERGUSassociationBundle:AdminBureau:ajouterNiveau.html.twig', array('niveaux' => $niveaux));
     } else {
         throw new \Exception("Erreur");
     }
 }