/**
  * @param string $className
  * @param string $version
  *
  * @return DataFixture
  */
 protected function createDataFixture($className, $version)
 {
     $result = new DataFixture();
     $result->setClassName($className);
     $result->setVersion($version);
     return $result;
 }
 /**
  * @inheritdoc
  */
 public function load(ObjectManager $manager)
 {
     if (!empty($this->dataFixturesClassNames)) {
         $loadedAt = new \DateTime('now', new \DateTimeZone('UTC'));
         foreach ($this->dataFixturesClassNames as $className => $version) {
             $dataFixture = null;
             if ($version !== null) {
                 $dataFixture = $manager->getRepository('RdvMigrationBundle:DataFixture')->findOneBy(['className' => $className]);
             }
             if (!$dataFixture) {
                 $dataFixture = new DataFixture();
                 $dataFixture->setClassName($className);
             }
             $dataFixture->setVersion($version)->setLoadedAt($loadedAt);
             $manager->persist($dataFixture);
         }
         $manager->flush();
     }
 }