1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the validation-bundle. |
||
5 | * |
||
6 | * (c) OttenCoffee <https://ottencoffee.co.id/> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Otten\Bundle\ValidationBundle; |
||
13 | |||
14 | use Symfony\Component\HttpKernel\Bundle\Bundle; |
||
15 | use Otten\Bundle\ValidationBundle\DependencyInjection\OttenValidationExtension; |
||
16 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
||
17 | use Otten\Bundle\ValidationBundle\DependencyInjection\Compiler\TwigFormPass; |
||
18 | |||
19 | /** |
||
20 | * @author Indra Gunawan <[email protected]> |
||
21 | */ |
||
22 | class OttenValidationBundle extends Bundle |
||
23 | { |
||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 1 | public function build(ContainerBuilder $container) |
|
28 | { |
||
29 | 1 | parent::build($container); |
|
30 | |||
31 | 1 | $container->addCompilerPass(new TwigFormPass()); |
|
32 | 1 | } |
|
33 | |||
34 | /** |
||
35 | * @return OttenValidationExtension |
||
36 | */ |
||
37 | 1 | public function getContainerExtension() |
|
38 | { |
||
39 | 1 | return new OttenValidationExtension(); |
|
40 | } |
||
41 | } |
||
42 |