/**
  * @param ObjectManager $manager
  */
 public function load(ObjectManager $manager)
 {
     for ($i = 0; $i < 2; $i++) {
         $category = new Category();
         $category->setName('Catégorie ' . $i);
         $category->setSlug($category->getName());
         $category->setContent($this->categoryContent[$i]);
         $category->setPictureName('default-image-' . $i . '.jpg');
         $manager->persist($category);
         // Reference added once
         if ($i == 0) {
             $this->addReference('category', $category);
         }
     }
     $manager->flush();
 }
 /**
  * {@inheritDoc}
  */
 public function getName()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getName', array());
     return parent::getName();
 }