Elcodi\Fixtures\DataFixtures\ORM\Store\StoreData::load PHP Method

load() public method

Load data fixtures with the passed EntityManager
public load ( Doctrine\Common\Persistence\ObjectManager $manager )
$manager Doctrine\Common\Persistence\ObjectManager
    public function load(ObjectManager $manager)
    {
        /**
         * @var ObjectDirector $storeDirector
         */
        $storeDirector = $this->getDirector('store');
        $address = $this->getReference('address-home');
        $language = $this->getReference('language-en');
        $currency = $this->getReference('currency-USD');
        /**
         * @var StoreInterface $store
         */
        $store = $storeDirector->create()->setName('Bamboo Store')->setLeitmotiv('A store powered by Elcodi')->setEmail('[email protected]')->setIsCompany(true)->setCif('B-12345678')->setTracker('123456')->setTemplate('2f1614601b2241b90c05cb67bc08f1ab7ba52af0')->setUseStock(true)->setAddress($address)->setDefaultLanguage($language)->setDefaultCurrency($currency);
        $storeDirector->save($store);
        $this->setReference('store', $store);
    }