forked from sulu/SuluFormBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SuluFormBundle.php
47 lines (42 loc) · 1.56 KB
/
SuluFormBundle.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
42
43
44
45
46
47
<?php
/*
* This file is part of Sulu.
*
* (c) Sulu GmbH
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Sulu\Bundle\FormBundle;
use Sulu\Bundle\FormBundle\DependencyInjection\CompilerPass\DynamicListBuilderCompilerPass;
use Sulu\Bundle\FormBundle\DependencyInjection\CompilerPass\ListProviderCompilerPass;
use Sulu\Bundle\FormBundle\DependencyInjection\CompilerPass\RemoveTaggedServiceCollectorCompilerPass;
use Sulu\Component\Symfony\CompilerPass\TaggedServiceCollectorCompilerPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class SuluFormBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
parent::build($container);
$container->addCompilerPass(new ListProviderCompilerPass());
$container->addCompilerPass(new DynamicListBuilderCompilerPass());
$container->addCompilerPass(new RemoveTaggedServiceCollectorCompilerPass(
'sulu_form.dynamic.type',
'alias',
'sulu_form.dynamic_disabled_types'
));
$container->addCompilerPass(new TaggedServiceCollectorCompilerPass(
'sulu_form.dynamic.form_field_type_pool',
'sulu_form.dynamic.type',
0,
'alias'
));
$container->addCompilerPass(new TaggedServiceCollectorCompilerPass(
'sulu_form.title_provider.pool',
'sulu_form.title_provider',
0,
'alias'
));
}
}