forked from akeneo/BatchBundle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
AkeneoBatchBundle.php
41 lines (38 loc) · 1.4 KB
/
AkeneoBatchBundle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace Akeneo\Bundle\BatchBundle;
use Akeneo\Bundle\BatchBundle\DependencyInjection\Compiler;
use Akeneo\Bundle\StorageUtilsBundle\DependencyInjection\Compiler\DoctrineOrmMappingsPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Batch Bundle
*
* @author Benoit Jacquemont <[email protected]>
* @copyright 2013 Akeneo SAS (http://www.akeneo.com)
* @license http://opensource.org/licenses/MIT MIT
*/
class AkeneoBatchBundle extends Bundle
{
/**
* {@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
)
);
}
}