-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFSiFormExtensionsBundle.php
More file actions
37 lines (30 loc) · 1.16 KB
/
FSiFormExtensionsBundle.php
File metadata and controls
37 lines (30 loc) · 1.16 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
<?php
/**
* (c) FSi sp. z o.o. <info@fsi.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace FSi\Bundle\FormExtensionsBundle;
use FSi\Bundle\FormExtensionsBundle\DependencyInjection\Compiler\TwigApiKeyPass;
use FSi\Bundle\FormExtensionsBundle\DependencyInjection\Compiler\TwigMapFormPass;
use FSi\Bundle\FormExtensionsBundle\DependencyInjection\FSIFormExtensionsExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class FSiFormExtensionsBundle extends Bundle
{
public function build(ContainerBuilder $container): void
{
$container->addCompilerPass(new TwigMapFormPass());
$container->addCompilerPass(new TwigApiKeyPass());
}
public function getContainerExtension(): ExtensionInterface
{
if (false === $this->extension instanceof FSIFormExtensionsExtension) {
$this->extension = new FSIFormExtensionsExtension();
}
return $this->extension;
}
}