Generates the configuration tree builder.

@return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
420436
public function getConfigTreeBuilder()
  {
    $treeBuilder = new TreeBuilder();
    $rootNode    = $treeBuilder->root('config');

    $rootNode
      ->useAttributeAsKey('name')
        ->prototype('array')
          ->children()
            ->enumNode('type')->values(array_merge(TypeEnum::toArray(), array_map('strtoupper', TypeEnum::toArray())))->defaultValue(null)->end()
            ->scalarNode('renameTo')->defaultValue(null)->end()
            ->arrayNode('children')->prototype('variable')->end()->end()
            ->arrayNode('options')
            ->addDefaultsIfNotSet()
              ->children()
                ->booleanNode('assoc')->defaultValue(true)->end()
                ->arrayNode('expected')->prototype('scalar')->end()->end()
                ->enumNode('stringValidation')->values(array_merge(StringValidationEnum::toArray(), array_map('strtoupper', StringValidationEnum::toArray())))->defaultValue(null)->end()
                ->booleanNode('strongValidation')->defaultValue(false)->end()
                ->floatNode('min')->defaultValue(null)->end()
                ->floatNode('max')->defaultValue(null)->end()
                ->integerNode('round')->defaultValue(null)->end()
                ->booleanNode('floor')->defaultValue(false)->end()
                ->booleanNode('ceil')->defaultValue(false)->end()
                ->scalarNode('returnClass')->defaultValue(null)->end()
                ->variableNode('defaultValue')->defaultValue(null)->end()
                ->scalarNode('regex')->defaultValue(null)->end()
                ->arrayNode('date')
                  ->addDefaultsIfNotSet()
                  ->children()
                    ->variableNode('expectedFormat')->defaultValue('Y-m-d')->end()
                    ->booleanNode('convertToObject')->defaultValue(false)->end()
                    ->scalarNode('convertToFormat')->defaultValue(null)->end()
                  ->end()
                ->end()
                ->booleanNode('required')->defaultValue(false)->end()
                ->arrayNode('requiredIfNotAvailable')
                ->addDefaultsIfNotSet()
                  ->children()
                    ->arrayNode('and')
                      ->prototype('scalar')->end()
                      ->defaultValue(array())
                    ->end()
                    ->arrayNode('or')
                      ->prototype('scalar')->end()
                      ->defaultValue(array())
                    ->end()
                  ->end()
                ->end()
                ->arrayNode('requiredIfAvailable')
                  ->addDefaultsIfNotSet()
                  ->children()
                    ->arrayNode('and')
                      ->prototype('scalar')->end()
                      ->defaultValue(array())
                    ->end()
                    ->arrayNode('or')
                      ->prototype('scalar')->end()
                      ->defaultValue(array())
                    ->end()
                  ->end()
                ->end()
                ->arrayNode('forbiddenIfNotAvailable')
                  ->prototype('scalar')->end()
                  ->defaultValue(array())
                ->end()
                ->arrayNode('forbiddenIfAvailable')
                  ->prototype('scalar')->end()
                  ->defaultValue(array())
                ->end()
                ->arrayNode('length')
                  ->addDefaultsIfNotSet()
                  ->children()
                    ->floatNode('min')->defaultValue(null)->end()
                    ->floatNode('max')->defaultValue(null)->end()
                  ->end()
                ->end()
                ->arrayNode('individual')->prototype('variable')->end()->end()
                ->append($this->addEventConfiguration())
              ->end()
            ->end()
          ->end()
        ->end()
      ->end();

    return $treeBuilder;
  }
311176
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();

        $builder
            ->root('alchemy_embed')
                ->children()
                    ->arrayNode('exceptions')
                        ->addDefaultsIfNotSet()
                        ->children()
                            ->arrayNode('content_types')
                                ->fixXmlConfig('content_type')
                                ->addDefaultChildrenIfNoneSet()
                                ->prototype('scalar')
                                    ->defaultValue('application/json')
                                ->end()
                            ->end()
                            ->scalarNode('enabled')->defaultTrue()->end()
                            ->scalarNode('transformer')->defaultNull()->end()
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $builder;
    }
577486
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('kitpages_file');

        $this->addMainSection($rootNode);

        return $treeBuilder;
    }
1077024
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root($this->alias);
        $rootNode
            ->validate()
                ->ifTrue(function($v) {
                    return !empty($v['enabled']) && empty($v['pools']);
                })
                ->thenInvalid('The child node "pools" at path "'.$this->alias.'" must be configured.')
            ->end()
            ->children()
                ->scalarNode('enabled')
                    ->defaultTrue()
                ->end()
                ->arrayNode('listeners')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('clear_entity_managers')->defaultTrue()->end()
                        ->booleanNode('clear_logs')->defaultTrue()->end()
                    ->end()
                ->end()
                ->arrayNode('pools')
                    ->requiresAtLeastOneElement()
                    ->validate()
                    ->ifTrue(function (array $value) {
                            return !array_key_exists('default', $value);
                    })
                        ->thenInvalid('Default service not present')
                    ->end()
                    ->prototype('array')
                        ->children()
                            ->scalarNode('send_driver')
                                ->isRequired()
                                ->validate()
                                ->ifTrue(function ($value) {
                                        return !preg_match('/^@[a-zA-Z\.\-0-9\_]+$/', $value);
                                })
                                    ->thenInvalid('Malformed service ID "%s"')
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('routes')
                    ->normalizeKeys(false)
                    ->prototype('scalar')
                        ->isRequired()
                    ->end()
                ->end()
            ->end()
            ;

        return $treeBuilder;
    }
1356055
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('twig');
        $rootNode = $treeBuilder->getRootNode();

        $rootNode
            ->children()
                ->scalarNode('exception_controller')->defaultValue('twig.controller.exception::showAction')->end()
            ->end()
        ;

        $this->addFormThemesSection($rootNode);
        $this->addGlobalsSection($rootNode);
        $this->addTwigOptions($rootNode);
        $this->addTwigFormatOptions($rootNode);

        return $treeBuilder;
    }
666312
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('sidus_eav_variant');
        $familyDefinition = $rootNode
            ->children()
            ->arrayNode('routes')
            ->children()
            ->scalarNode('select')->isRequired()->end()
            ->scalarNode('create')->isRequired()->end()
            ->scalarNode('edit')->isRequired()->end()
            ->scalarNode('delete')->isRequired()->end()
            ->end()
            ->end()
            ->arrayNode('families')
            ->prototype('array')
            ->children();

        $this->appendFamilyDefinition($familyDefinition);

        $familyDefinition->end()
            ->end()
            ->end()
            ->end();

        return $treeBuilder;
    }
320649
public function getConfigTreeBuilder(): TreeBuilder
    {
        $treeBuilder = new TreeBuilder('bazinga_hateoas');
        if (\method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $rootNode = $treeBuilder->root('bazinga_hateoas');
        }

        $rootNode
            ->children()
            ->arrayNode('metadata')
                ->addDefaultsIfNotSet()
                ->children()
                    ->scalarNode('cache')->defaultValue('file')->end()
                    ->arrayNode('file_cache')
                        ->addDefaultsIfNotSet()
                        ->children()
                            ->scalarNode('dir')->defaultValue('%kernel.cache_dir%/hateoas')->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
            ->arrayNode('serializer')
                ->addDefaultsIfNotSet()
                ->children()
                    ->scalarNode('json')->defaultValue('hateoas.serializer.json_hal')->end()
                    ->scalarNode('xml')->defaultValue('hateoas.serializer.xml')->end()
                ->end()
            ->end()
            ->arrayNode('twig_extension')
                ->addDefaultsIfNotSet()
                ->canBeDisabled()
            ->end();

        return $treeBuilder;
    }
1098549
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('ezrichtext');

        $sections = $rootNode->children();
        $this
            ->addCustomTagsSection($sections);
        $this
            ->addCustomStylesSection($sections);
        $this
            ->addAlloyEditorSection($sections)
            ->end();

        return $treeBuilder;
    }
1311197
public function getConfigTree()
    {
        $treeBuilder = new TreeBuilder();
        $treeBuilder->root('sixdays_opcache', 'array')
            ->isRequired()
            ->children()
                ->scalarNode('base_url')->isRequired()->end()
                ->scalarNode('web_dir')->isRequired()->end()
            ->end()
        ->end();

        return $treeBuilder->buildTree();
    }
574552
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('zicht_file_manager');
        
        $rootNode->children()
            // Default behaviour is to lower case file names
            ->scalarNode('case_preservation')->defaultFalse();

        $rootNode->children()->scalarNode('naming_strategy')->defaultValue(DefaultNamingStrategy::class);

        return $treeBuilder;
    }
1366683
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('doctrine_riak');

        $this->addDocumentManagersSection($rootNode);
        $this->addConnectionsSection($rootNode);
        $this->addResolveTargetDocumentsSection($rootNode);

        $rootNode
            ->children()
                ->scalarNode('proxy_namespace')->defaultValue('RiakODMProxies')->end()
                ->scalarNode('proxy_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/riak/Proxies')->end()
                ->scalarNode('auto_generate_proxy_classes')->defaultValue(false)->end()
                ->scalarNode('hydrator_namespace')->defaultValue('Hydrators')->end()
                ->scalarNode('hydrator_dir')->defaultValue('%kernel.cache_dir%/doctrine/odm/riak/Hydrators')->end()
                ->scalarNode('auto_generate_hydrator_classes')->defaultValue(false)->end()
                ->scalarNode('default_document_manager')->end()
                ->scalarNode('default_connection')->end()
                ->scalarNode('default_database')->defaultValue('default')->end()
                ->arrayNode('default_commit_options')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('j')->end()
                        ->scalarNode('timeout')->end()
                        ->scalarNode('w')->end()
                        ->scalarNode('wtimeout')->end()
                        // Deprecated options
                        ->booleanNode('fsync')->info('Deprecated. Please use the "j" option instead.')->end()
                        ->scalarNode('safe')->info('Deprecated. Please use the "w" option instead.')->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
333796
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('plugin');
        $rootNode
            ->addDefaultsIfNotSet()
            ->children()
                ->enumNode('type')
                    ->values([
                        PluginTypes::TYPE_PLUGIN,
                        PluginTypes::TYPE_TEMPLATE,
                    ])
                ->end()
                ->scalarNode('category')
                    ->defaultNull()
                ->end()
                ->scalarNode('name')
                    ->isRequired()
                ->end()
                ->scalarNode('visible')
                    ->defaultTrue()
                ->end()
                ->scalarNode('fa_icon')
                    ->defaultNull()
                ->end()
                ->scalarNode('description')
                    ->defaultNull()
                ->end()
                ->booleanNode('enabled_by_default')
                    ->defaultFalse()
                ->end()
                ->arrayNode('fields')
                    ->prototype('array')
                        ->addDefaultsIfNotSet()
                        ->children()
                            ->scalarNode('type')
                                ->isRequired()
                            ->end()
                            ->booleanNode('required')
                                ->defaultFalse()
                            ->end()
                            ->scalarNode('data')
                                ->defaultNull()
                            ->end()
                            ->scalarNode('label')
                                ->defaultNull()
                            ->end()
                            ->arrayNode('options')
                                ->prototype('variable')
                                ->end()
                            ->end()
                            ->variableNode('attr')
                                ->defaultValue([])
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
1370083
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder('hwi_oauth');

        if (method_exists($builder, 'getRootNode')) {
            $rootNode = $builder->getRootNode();
        } else {
            // BC layer for symfony/config 4.1 and older
            $rootNode = $builder->root('hwi_oauth');
        }

        $rootNode
            ->fixXmlConfig('firewall_name')
            ->children()
                ->arrayNode('firewall_names')
                    ->isRequired()
                    ->requiresAtLeastOneElement()
                    ->prototype('scalar')->end()
                ->end()
                ->scalarNode('target_path_parameter')->defaultNull()->end()
                ->booleanNode('use_referer')->defaultFalse()->end()
                ->booleanNode('failed_use_referer')->defaultFalse()->end()
                ->scalarNode('failed_auth_path')->defaultValue('hwi_oauth_connect')->end()
                ->scalarNode('grant_rule')
                    ->defaultValue('IS_AUTHENTICATED_REMEMBERED')
                    ->validate()
                        ->ifTrue(function ($role) {
                            return !('IS_AUTHENTICATED_REMEMBERED' === $role || 'IS_AUTHENTICATED_FULLY' === $role);
                        })
                        ->thenInvalid('Unknown grant role set "%s".')
                    ->end()
                ->end()
            ->end()
        ;

        $this->addHttpClientConfiguration($rootNode);
        $this->addConnectConfiguration($rootNode);
        $this->addFosubConfiguration($rootNode);
        $this->addResourceOwnersConfiguration($rootNode);

        return $builder;
    }
1214181
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('security');

        $rootNode
            ->addDefaultsIfNotSet()
            ->children()
            ->scalarNode('firewall')->isRequired()->end()
            ->arrayNode('authenticator')
                ->addDefaultsIfNotSet()
                ->children()
                    ->scalarNode('type')
                        ->isRequired()
                        ->validate()
                            ->ifNotInArray(array('username', 'closure'))
                            ->thenInvalid('Invalid security authenticator %s')
                        ->end()
                    ->end()
                    ->scalarNode('username')->end()
                    ->scalarNode('password')->end()
                ->end()
            ->end()
            ->scalarNode('login_path')->defaultValue('/login')->end()
            ->scalarNode('success_path')->defaultValue('/')->end()
            ->scalarNode('logout_path')->defaultValue('/logout')->end()
            ->scalarNode('token_session_key')->defaultValue('__nice.is_authenticated')->end()
            ->end();

        return $treeBuilder;
    }
1034489
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('victoire_seo');

        $rootNode
            ->addDefaultsIfNotSet()
            ->children()
                ->arrayNode('analytics')
                    ->useAttributeAsKey(true)
                    ->prototype('array')
                    ->children()
                        ->booleanNode('enabled')->defaultValue('false')->end()
                        ->scalarNode('key')->defaultNull()->end()
                    ->end()
                ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
1057963
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $http    = $builder->root('http');
        {
            $http->children()->scalarNode('cache_dir')->defaultValue(null);
            $http->children()->booleanNode('behind_elb')->defaultValue(false);
            $http->children()->booleanNode('trust_cloudfront_ips')->defaultValue(false);
            $http->children()->variableNode('trusted_proxies');
            $http->children()->variableNode('trusted_header_set');
            $http->children()->variableNode('routing');
            $http->children()->variableNode('twig');
            $http->children()->variableNode('security');
            $http->children()->variableNode('cors');
            $http->children()->variableNode('view_handlers');
            $http->children()->variableNode('error_handlers');
            $http->children()->variableNode('injected_args');
            $http->children()->variableNode('middlewares');
            $http->children()->variableNode('providers');
        }
        
        return $builder;
    }
1157149
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder(static::ROOT_NODE);

        if (method_exists($treeBuilder, 'getRootNode')) {
            // Symfony 4.2 +
            $rootNode = $treeBuilder->getRootNode();
        } else {
            // Symfony 4.1 and below
            $rootNode = $treeBuilder->root(static::ROOT_NODE);
        }

        return
            $rootNode
                ->children()
                    ->scalarNode('cache')
                        ->cannotBeEmpty()
                        ->defaultValue('%kernel.cache_dir%/GeoLite2-City.mmdb')
                    ->end()
                    ->scalarNode('url')
                        ->cannotBeEmpty()
                        ->defaultValue('https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz')
                    ->end()
                    ->arrayNode('locales')
                        ->treatNullLike([])
                        ->prototype('scalar')->end()
                        ->defaultValue(['%locale%'])
                    ->end()
                ->end()
            ->end()
        ;
    }