Example #1
0
 /**
  * @return \WellCommerce\Bundle\MultiStoreBundle\Entity\CompanyInterface
  */
 public function create()
 {
     $company = new Company();
     $company->setName('');
     $company->setShortName('');
     return $company;
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $fakerGenerator = $this->getFakerGenerator();
     $company = new Company();
     $company->setName($fakerGenerator->company . ' ' . $fakerGenerator->companySuffix);
     $company->setShortName($fakerGenerator->company);
     $company->setCountry($fakerGenerator->countryCode);
     $company->setStreet($fakerGenerator->streetName);
     $company->setStreetNo($fakerGenerator->streetSuffix);
     $company->setFlatNo($fakerGenerator->randomNumber());
     $company->setPostCode($fakerGenerator->postcode);
     $company->setCity($fakerGenerator->city);
     $manager->persist($company);
     $manager->flush();
     $this->setReference('company', $company);
 }