/**
  *
  */
 public function load(ObjectManager $manager)
 {
     foreach ($this->genres as $genreName) {
         $genre = new Genre();
         $genre->setName($genreName);
         $manager->persist($genre);
     }
     $manager->flush();
 }
Beispiel #2
0
 /**
  * Remove genre
  *
  * @param Genre $genre
  */
 public function removeGenre(Genre $genre)
 {
     $this->genres->removeElement($genre);
 }