forked from VincentChalnot/SidusEAVModelBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSidusEAVModelBundle.php
More file actions
43 lines (40 loc) · 1.2 KB
/
SidusEAVModelBundle.php
File metadata and controls
43 lines (40 loc) · 1.2 KB
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
42
43
<?php
namespace Sidus\EAVModelBundle;
use Sidus\EAVModelBundle\DependencyInjection\Compiler\GenericCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* @author Vincent Chalnot <vincent@sidus.fr>
*/
class SidusEAVModelBundle extends Bundle
{
/**
* Adding compiler passes to inject services into configuration handlers
*
* @param ContainerBuilder $container
*/
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(
new GenericCompilerPass(
'sidus_eav_model.attribute_type_configuration.handler',
'sidus.attribute_type',
'addType'
)
);
$container->addCompilerPass(
new GenericCompilerPass(
'sidus_eav_model.attribute_configuration.handler',
'sidus.attribute',
'addAttribute'
)
);
$container->addCompilerPass(
new GenericCompilerPass(
'sidus_eav_model.family_configuration.handler',
'sidus.family',
'addFamily'
)
);
}
}