public function saveCategorie($name) { $categorieToSave = new Categorie(); try { $categorieToSave->setNom($name); $categorieToSave->setUrl("/" . $name); } catch (\Exception $e) { throw $e; } $this->em->persist($categorieToSave); $this->em->flush(); }
/** * {@inheritDoc} */ public function setNom($nom) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setNom', array($nom)); return parent::setNom($nom); }