for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of A2lix projects.
*
* (c) David ALLIX
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace A2lix\AutoFormBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
/**
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('a2lix_auto_form');
$rootNode
->children()
->arrayNode('excluded_fields')
->defaultValue(['id', 'locale', 'translatable'])
->beforeNormalization()
->ifString()
->then(function ($v) {
return preg_split('/\s*,\s*/', $v);
})
->end()
->prototype('scalar')->end()
;
return $treeBuilder;
}