for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace A2lix\AutoFormBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* @author David ALLIX
*/
class TemplatingPass implements CompilerPassInterface
{
* {@inheritdoc}
public function process(ContainerBuilder $container)
if (false !== ($template = $container->getParameter('a2lix_auto_form.templating'))) {
$resources = $container->getParameter('twig.form.resources');
if (!in_array($template, $resources, true)) {
$resources[] = $template;
$container->setParameter('twig.form.resources', $resources);
}