Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function generate(LoaderInterface $loader, FixturesLoaderInterface $fixturesLoader, array $bundles, $environment)
 {
     $doctrineDataLoaders = $this->fixturesFinder->getDataLoaders($bundles, $environment);
     $_fixturesLoader = clone $fixturesLoader;
     $_fixturesLoader->addProvider($doctrineDataLoaders);
     return new Loader($_fixturesLoader, $loader->getProcessors(), $loader->getPersistOnce());
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function generate(LoaderInterface $loader, FixturesLoaderInterface $fixturesLoader, array $bundles, $environment)
 {
     if (!$loader instanceof Loader) {
         throw new \UnexpectedValueException('Unsupported loader for this generator. Must be an instance of Hautelook\\AliceBundle\\Alice\\DataFixtures\\Loader.');
     }
     $doctrineDataLoaders = $this->fixturesFinder->getDataLoaders($bundles, $environment);
     $_fixturesLoader = clone $fixturesLoader;
     $_fixturesLoader->addProvider($doctrineDataLoaders);
     return new Loader($_fixturesLoader, $loader->getProcessorChain(), $loader->getPersistOnce(), $loader->getLoadingLimit());
 }