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