24 lines
826 B
PHP
24 lines
826 B
PHP
|
<?php
|
||
|
|
||
|
namespace Gregwar\CaptchaBundle\DependencyInjection;
|
||
|
|
||
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||
|
use Symfony\Component\DependencyInjection\Definition;
|
||
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||
|
use Symfony\Component\Config\FileLocator;
|
||
|
|
||
|
class GregwarCaptchaExtension extends Extension
|
||
|
{
|
||
|
public function load(array $configs, ContainerBuilder $container)
|
||
|
{
|
||
|
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||
|
$loader->load('services.yml');
|
||
|
|
||
|
$resources = $container->getParameter('twig.form.resources');
|
||
|
$resources[] = 'GregwarCaptchaBundle::captcha.html.twig';
|
||
|
$container->setParameter('twig.form.resources', $resources);
|
||
|
}
|
||
|
}
|
||
|
|