示例#1
0
 /**
  * @return \WellCommerce\AppBundle\Entity\ClientGroupInterface
  */
 public function create()
 {
     $clientGroup = new ClientGroup();
     $clientGroup->setDiscount(0);
     $clientGroup->setClients(new ArrayCollection());
     $clientGroup->setPages(new ArrayCollection());
     return $clientGroup;
 }
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $clientGroup = new ClientGroup();
     $clientGroup->setDiscount(10);
     $clientGroup->translate('en')->setName('Default client group');
     $clientGroup->mergeNewTranslations();
     $manager->persist($clientGroup);
     $manager->flush();
     $this->setReference('client_group', $clientGroup);
 }