-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathITEFormBundle.php
More file actions
46 lines (40 loc) · 1.45 KB
/
ITEFormBundle.php
File metadata and controls
46 lines (40 loc) · 1.45 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
44
45
46
<?php
namespace ITE\FormBundle;
use ITE\FormBundle\DependencyInjection\Compiler\Component\Validation\ConstraintPass;
use ITE\FormBundle\DependencyInjection\Compiler\EntityConverterPass;
use ITE\FormBundle\DependencyInjection\Compiler\FormTypeGuesserPass;
use ITE\FormBundle\DependencyInjection\Compiler\SFFormExtensionPass;
use ITE\FormBundle\DependencyInjection\Compiler\FormResourcePass;
use ITE\FormBundle\DependencyInjection\Compiler\RouterResourcePass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Class ITEFormBundle
*
* @author c1tru55 <mr.c1tru55@gmail.com>
*/
class ITEFormBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function boot()
{
$proxyFactory = $this->container->get('ite_form.proxy_factory');
spl_autoload_register($proxyFactory->getProxyAutoloader());
parent::boot();
}
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new SFFormExtensionPass());
$container->addCompilerPass(new FormResourcePass()); // must be placed AFTER SFFormExtensionPass!
$container->addCompilerPass(new FormTypeGuesserPass());
$container->addCompilerPass(new RouterResourcePass());
$container->addCompilerPass(new EntityConverterPass());
$container->addCompilerPass(new ConstraintPass());
parent::build($container);
}
}