Пример #1
0
 public function load(ObjectManager $manager)
 {
     //dump($this->getReference('refcat'));
     //die;
     $product = new Product();
     $product->setTitle('mon super produit fixtures');
     $product->setDescription('lorem ipsum');
     $product->setPrix('250 Euros');
     $product->setQuantite('20');
     $product->setActive('true');
     $product->setCateg($this->getReference('refcat'));
     $product->setProduitMarque($this->getReference('refbrand'));
     $manager->persist($product);
     $manager->flush();
 }