Ejemplo n.º 1
0
 public function build(ContainerBuilder $container)
 {
     $productMappings = [realpath(__DIR__ . '/Resources/config/model/doctrine') => 'Acme\\Bundle\\AppBundle\\Model'];
     $container->addCompilerPass(DoctrineOrmMappingsPass::createYamlMappingDriver($productMappings, ['doctrine.orm.entity_manager'], 'akeneo_storage_utils.storage_driver.doctrine/orm'));
     if (class_exists(AkeneoStorageUtilsBundle::DOCTRINE_MONGODB)) {
         $mongoDBClass = AkeneoStorageUtilsBundle::DOCTRINE_MONGODB;
         $container->addCompilerPass($mongoDBClass::createYamlMappingDriver($productMappings, ['doctrine.odm.mongodb.document_manager'], 'akeneo_storage_utils.storage_driver.doctrine/mongodb-odm'));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function build(ContainerBuilder $container)
 {
     $container->addCompilerPass(new RegisterSerializerPass('pim_versioning.serializer'))->addCompilerPass(new RegisterUpdateGuessersPass())->addCompilerPass(new RegisterVersionPurgerAdvisorPass());
     $versionMappings = [realpath(__DIR__ . '/Resources/config/model/doctrine') => 'Akeneo\\Component\\Versioning\\Model'];
     $container->addCompilerPass(DoctrineOrmMappingsPass::createYamlMappingDriver($versionMappings, ['doctrine.orm.entity_manager'], 'akeneo_storage_utils.storage_driver.doctrine/orm'));
     if (class_exists(AkeneoStorageUtilsBundle::DOCTRINE_MONGODB)) {
         $mongoDBClass = AkeneoStorageUtilsBundle::DOCTRINE_MONGODB;
         $container->addCompilerPass($mongoDBClass::createYamlMappingDriver($versionMappings, ['doctrine.odm.mongodb.document_manager'], 'akeneo_storage_utils.storage_driver.doctrine/mongodb-odm'));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function build(ContainerBuilder $container)
 {
     $container->addCompilerPass(new ResolveDoctrineTargetModelPass())->addCompilerPass(new ResolveDoctrineTargetRepositoryPass('pim_repository'))->addCompilerPass(new RegisterAttributeConstraintGuessersPass())->addCompilerPass(new RegisterAttributeTypePass())->addCompilerPass(new RegisterQueryGeneratorsPass())->addCompilerPass(new RegisterProductQueryFilterPass())->addCompilerPass(new RegisterProductQuerySorterPass())->addCompilerPass(new RegisterProductUpdaterPass())->addCompilerPass(new RegisterFilterPass())->addCompilerPass(new RegisterComparatorsPass())->addCompilerPass(new RegisterCompleteCheckerPass());
     $productMappings = [realpath(__DIR__ . '/Resources/config/model/doctrine') => 'Pim\\Component\\Catalog\\Model'];
     $container->addCompilerPass(DoctrineOrmMappingsPass::createYamlMappingDriver($productMappings, ['doctrine.orm.entity_manager'], 'akeneo_storage_utils.storage_driver.doctrine/orm'));
     if (class_exists(AkeneoStorageUtilsBundle::DOCTRINE_MONGODB)) {
         $mongoDBClass = AkeneoStorageUtilsBundle::DOCTRINE_MONGODB;
         $container->addCompilerPass($mongoDBClass::createYamlMappingDriver($productMappings, ['doctrine.odm.mongodb.document_manager'], 'akeneo_storage_utils.storage_driver.doctrine/mongodb-odm'));
     }
 }
 /**
  * {@inheritdoc}
  */
 public function build(ContainerBuilder $container)
 {
     $container->addCompilerPass(new ResolveDoctrineTargetModelPass())->addCompilerPass(new RegisterConverterPass());
     $mappings = [realpath(__DIR__ . '/Resources/config/model/doctrine') => 'Pim\\Component\\Connector\\Model'];
     $container->addCompilerPass(DoctrineOrmMappingsPass::createYamlMappingDriver($mappings, ['doctrine.orm.entity_manager'], false));
 }
 /**
  * {@inheritdoc}
  */
 public function build(ContainerBuilder $container)
 {
     $mappings = [realpath(__DIR__ . '/Resources/config/model/doctrine') => 'Akeneo\\Component\\Batch\\Model'];
     $container->addCompilerPass(new Compiler\RegisterNotifiersPass())->addCompilerPass(new Compiler\PushBatchLogHandlerPass())->addCompilerPass(new Compiler\RegisterJobsPass())->addCompilerPass(new Compiler\RegisterJobParametersPass('default_values_provider'))->addCompilerPass(new Compiler\RegisterJobParametersPass('constraint_collection_provider'))->addCompilerPass(DoctrineOrmMappingsPass::createYamlMappingDriver($mappings, ['doctrine.orm.entity_manager'], false));
 }