Generates the configuration tree builder.

@return TreeBuilder The tree builder
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;
    }
1288630
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('openclassrooms_cache');
        $rootNode
            ->children()
                ->arrayNode('provider')
                ->performNoDeepMerging()
                ->beforeNormalization()
                    ->ifString()
                    ->then(function($v) { return array($v => array()); })
                ->end()
                    ->children()
                        ->append($this->addArrayNode())
                        ->append($this->addRedisNode())
                    ->end()
                ->end()
            ->end()
            ->children()
                ->scalarNode('default_lifetime')
                    ->defaultValue(0)
                ->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;
    }
881637
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();

        $builder->root('bazinga_js_translation')
            ->fixXmlConfig('active_locale')
            ->fixXmlConfig('active_domain')
            ->children()
                ->scalarNode('locale_fallback')->defaultValue('en')->end()
                ->scalarNode('default_domain')->defaultValue('messages')->end()
                ->scalarNode('http_cache_time')->defaultValue('86400')->end()
                ->arrayNode('active_locales')
                    ->prototype('scalar')
                    ->end()
                ->end()
                ->arrayNode('active_domains')
                    ->prototype('scalar')
                    ->end()
                ->end()
            ->end();

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

        $treeBuilder->getRootNode()
            ->children()
                ->booleanNode('toolbar')->defaultFalse()->end()
                ->booleanNode('intercept_redirects')->defaultFalse()->end()
                ->scalarNode('excluded_ajax_paths')->defaultValue('^/((index|app(_[\w]+)?)\.php/)?_wdt')->end()
            ->end()
        ;

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

        $root = $treeBuilder->root('form');
        $root
            ->children()
                ->arrayNode('themes')
                    ->fixXmlConfig('themes')
                    ->addDefaultChildrenIfNoneSet()
                    ->prototype('scalar')->defaultValue('default')->end()
                    ->validate()
                        ->ifTrue(function ($v) {
                            return !in_array('default', $v);
                        })
                        ->then(function ($v) {
                            return array_merge(['default'], $v);
                        })
                    ->end()
                ->end()
            ->end();

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

        $this->addResolversSection($rootNode, $this->factories);

        $rootNode
            ->children()
                ->scalarNode('upload_resolver')->end()
                ->scalarNode('croped_resolver')->end()
                ->scalarNode('crop_route')->defaultValue('jb_image_crop_endpoint')->end()
                ->scalarNode('croped_fs')->end()
                ->arrayNode('endpoints')
                    ->defaultValue(array())
                    ->prototype('array')
                        ->children()
                            ->scalarNode('upload_resolver')->end()
                            ->scalarNode('croped_resolver')->end()
                            ->scalarNode('croped_fs')->end()
                            ->append($this->getValidators('upload_validators'))
                            ->append($this->getValidators('crop_validators'))
                        ->end()
                    ->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
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;
  }
377752
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('kitpages_file_system');

        $this->addMainSection($rootNode, $this->factories);

        $rootNode
        // add a faux-entry for factories, so that no validation error is thrown
            ->fixXmlConfig('factory', 'factories')
            ->children()
                ->arrayNode('factories')->ignoreExtraKeys()->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;
    }
1214872
protected function getMailerConfigurationTreeBuilder()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('mailer');
        $node
            ->children()
            ->scalarNode('company')->end()
            ->scalarNode('from_email')->end()
            ->scalarNode('from_name')->end()
            ->end();

        return $node;
    }
1204389
public function getConfigTreeBuilder()
  {
    $treeBuilder = new TreeBuilder();
    $rootNode    = $treeBuilder->root('enm_transformer');

    $rootNode
        ->useAttributeAsKey('name')
        ->prototype('array')
          ->children()
            ->append($this->addEventConfiguration())
          ->end()
        ->end()
      ->end();

    return $treeBuilder;
  }
52209
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $rule    = $builder->root('rule');
        {
            $rule->children()->variableNode('pattern')->isRequired();
            $rule->children()->variableNode('roles')->isRequired()->beforeNormalization()->ifString()->then(
                function ($v) {
                    return [$v];
                }
            )->end();
            $rule->children()->enumNode('channel')->values([null, 'http', 'https'])->defaultValue(null);

        }

        return $builder;
    }
1369448
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('framework');
        $rootNode
            ->children()
                ->arrayNode('language')
                    ->prototype('scalar')->end()
                ->end()
                ->booleanNode('prefer_cdn')
                    ->defaultFalse()
                ->end()
                ->scalarNode('project_name')
                    ->defaultValue('Demo')
                ->end()
                ->scalarNode('company_name')
                    ->defaultValue('Acme')
                ->end()
            ->end()
        ;
        $this->appendChordsNodes($rootNode);

        return $treeBuilder;
    }
1084900
public function getConfigTree()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('david_badura_faker', 'array');

        $rootNode
            ->children()
                ->scalarNode('locale')->defaultValue('en_US')->end()
            ->end()
        ;

        return $treeBuilder->buildTree();
    }
207964
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('sidus_eav_model');
        /** @var NodeBuilder $attributeDefinition */
        $attributeDefinition = $rootNode
            ->children()
                ->scalarNode('data_class')->isRequired()->end()
                ->scalarNode('value_class')->isRequired()->end()
                ->booleanNode('serializer_enabled')->defaultFalse()->end()
                ->scalarNode('collection_type')->defaultValue(CollectionType::class)->end()
                ->scalarNode('context_form_type')->defaultNull()->end()
                ->variableNode('default_context')->defaultValue([])->end()
                ->arrayNode('global_context_mask')
                    ->prototype('scalar')->defaultValue([])->end()
                ->end()
                ->arrayNode('attributes')
                    ->useAttributeAsKey('code')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->cannotBeOverwritten()
                        ->children();

        $this->appendAttributeDefinition($attributeDefinition);

        /** @var NodeBuilder $familyDefinition */
        $familyDefinition = $attributeDefinition
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('families')
                    ->useAttributeAsKey('code')
                    ->prototype('array')
                        ->performNoDeepMerging()
                        ->cannotBeOverwritten()
                        ->children();

        $this->appendFamilyDefinition($familyDefinition);

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

        return $treeBuilder;
    }
762701
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $treeBuilder->root('synapse_cmf')
            ->addDefaultsIfNotSet()
            ->children()
                ->arrayNode('forms')
                    ->canBeEnabled()
                ->end()
                ->arrayNode('media')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('store')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('physical_path')
                                    ->cannotBeEmpty()
                                    ->defaultValue('%kernel.root_dir%/../web/assets/')
                                    ->beforeNormalization()
                                        ->ifString()
                                        ->then(function ($v) {
                                            return sprintf('/%s/', trim($v, '/'));
                                        })
                                    ->end()
                                ->end()
                                ->scalarNode('web_path')
                                    ->cannotBeEmpty()
                                    ->defaultValue('assets')
                                    ->beforeNormalization()
                                        ->ifString()
                                        ->then(function ($v) {
                                            return trim($v, '/');
                                        })
                                    ->end()
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('components')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('controller')
                                ->isRequired()->cannotBeEmpty()
                            ->end()
                            ->scalarNode('template_path')
                                ->isRequired()->cannotBeEmpty()
                            ->end()
                            ->scalarNode('form')
                                ->isRequired()->cannotBeEmpty()
                            ->end()
                            ->arrayNode('config')
                                ->useAttributeAsKey('name')
                                ->prototype('scalar')->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('content_types')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('alias')
                                ->isRequired()->cannotBeEmpty()
                            ->end()
                            ->scalarNode('provider')
                                ->isRequired()->cannotBeEmpty()
                            ->end()
                        ->end()
                    ->end()
                    ->validate()
                        ->ifTrue(function ($v) {
                            foreach ($v as $class => $data) {
                                if (!class_exists($class, true)
                                    || !is_a($class, ContentInterface::class, true)
                                ) {
                                    return true;
                                }
                            }
                        })
                        ->thenInvalid('Content types have to be Synapse\Cmf\Framework\Theme\Content\Model\ContentInterface objects.')
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }