1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Povs\ListerBundle; |
4
|
|
|
|
5
|
|
|
use Povs\ListerBundle\Declaration\ListInterface; |
6
|
|
|
use Povs\ListerBundle\DependencyInjection\Compiler\ListCompilerPass; |
7
|
|
|
use Povs\ListerBundle\Type\FieldType\FieldTypeInterface; |
8
|
|
|
use Povs\ListerBundle\Type\FilterType\FilterTypeInterface; |
9
|
|
|
use Povs\ListerBundle\Type\ListType\ListTypeInterface; |
10
|
|
|
use Povs\ListerBundle\Type\QueryType\QueryTypeInterface; |
11
|
|
|
use Povs\ListerBundle\Type\SelectorType\SelectorTypeInterface; |
12
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
13
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @author Povilas Margaiatis <[email protected]> |
17
|
|
|
*/ |
18
|
|
|
class PovsListerBundle extends Bundle |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* @inheritDoc |
22
|
|
|
*/ |
23
|
2 |
|
public function build(ContainerBuilder $container): void |
24
|
|
|
{ |
25
|
2 |
|
$container->registerForAutoconfiguration(ListInterface::class) |
26
|
2 |
|
->addTag('povs_lister.list'); |
27
|
2 |
|
$container->registerForAutoconfiguration(QueryTypeInterface::class) |
28
|
2 |
|
->addTag('povs_lister.query_type'); |
29
|
2 |
|
$container->registerForAutoconfiguration(FieldTypeInterface::class) |
30
|
2 |
|
->addTag('povs_lister.field_type'); |
31
|
2 |
|
$container->registerForAutoconfiguration(ListTypeInterface::class) |
32
|
2 |
|
->addTag('povs_lister.list_type'); |
33
|
2 |
|
$container->registerForAutoconfiguration(FilterTypeInterface::class) |
34
|
2 |
|
->addTag('povs_lister.filter_type'); |
35
|
2 |
|
$container->registerForAutoconfiguration(SelectorTypeInterface::class) |
36
|
2 |
|
->addTag('povs_lister.selector_type'); |
37
|
|
|
|
38
|
2 |
|
$container->addCompilerPass(new ListCompilerPass()); |
39
|
|
|
|
40
|
2 |
|
parent::build($container); |
41
|
|
|
} |
42
|
|
|
} |
43
|
|
|
|