for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\DoctrineMongoDBAdminBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This class contains the configuration information for the bundle.
* This information is solely responsible for how the different configuration
* sections are normalized, and merged.
* @author Michael Williams <[email protected]>
class Configuration implements ConfigurationInterface
{
* Generates the configuration tree.
* @return \Symfony\Component\Config\Definition\Builder\TreeBuilder
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder('sonata_doctrine_mongo_db_admin');
$rootNode = $treeBuilder->getRootNode();
$rootNode
->children()
->arrayNode('templates')
->addDefaultsIfNotSet()
->arrayNode('form')
->prototype('scalar')->end()
->defaultValue(['@SonataDoctrineMongoDBAdmin/Form/form_admin_fields.html.twig'])
->end()
->arrayNode('filter')
->defaultValue(['@SonataDoctrineMongoDBAdmin/Form/filter_admin_fields.html.twig'])
->arrayNode('types')
->arrayNode('list')
->useAttributeAsKey('name')
->arrayNode('show')
;
return $treeBuilder;
}