Config tree builder.

Example config:

gpslab_domain_event:
bus: 'listener_located'
queue: 'pull_memory'
locator: 'symfony'

@return TreeBuilder
425712
public function getConfigTreeBuilder()
    {
        return (new TreeBuilder())
            ->root('gpslab_domain_event')
                ->children()
                    ->scalarNode('bus')
                        ->cannotBeEmpty()
                        ->defaultValue('listener_located')
                    ->end()
                    ->scalarNode('queue')
                        ->cannotBeEmpty()
                        ->defaultValue('pull_memory')
                    ->end()
                    ->scalarNode('locator')
                        ->cannotBeEmpty()
                        ->defaultValue('symfony')
                    ->end()
                    ->booleanNode('publish_on_flush')
                        ->defaultValue(false)
                    ->end()
                ->end()
            ->end()
        ;
    }
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;
    }
127741
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $treeBuilder->root('majora_oauth_server')
            ->children()
                ->scalarNode('secret')
                    ->isRequired()
                    ->cannotBeEmpty()
                ->end()
                ->append($this->createTokenNode(
                    'access_token',
                    AccessToken::class,
                    AccessTokenInterface::class,
                    AccessTokenInterface::DEFAULT_TTL
                ))
                ->append($this->createTokenNode(
                    'refresh_token',
                    RefreshToken::class,
                    RefreshTokenInterface::class,
                    RefreshTokenInterface::DEFAULT_TTL
                ))
                ->arrayNode('application')
                    ->isRequired()
                    ->children()
                        ->append($this->createDriverStrategyNode('loader'))
                        ->append($this->createDriverStrategyNode('repository'))
                    ->end()
                ->end()
                ->arrayNode('account')
                    ->isRequired()
                    ->children()
                        ->append($this->createDriverStrategyNode('loader'))
                        ->append($this->createDriverStrategyNode('repository'))
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder;
    }
228379
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('eko_feed');

        if (\method_exists($treeBuilder, 'getRootNode')) {
            $rootNode = $treeBuilder->getRootNode();
        } else {
            $rootNode = $treeBuilder->root('eko_feed');
        }

        $rootNode
            ->children()
                ->scalarNode('hydrator')->defaultValue('eko_feed.hydrator.default')->end()
                ->scalarNode('translation_domain')->defaultNull()->end()
                ->arrayNode('feeds')
                    ->requiresAtLeastOneElement()
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('title')->isRequired()->end()
                            ->scalarNode('description')->isRequired()->end()
                            ->arrayNode('link')
                                ->isRequired()
                                ->beforeNormalization()
                                    ->ifString()
                                    ->then(function ($value) {
                                        return ['uri' => $value];
                                    })
                                ->end()
                                ->children()
                                    ->scalarNode('route_name')->end()
                                    ->arrayNode('route_params')
                                        ->useAttributeAsKey('key')
                                        ->prototype('scalar')->end()
                                    ->end()
                                    ->scalarNode('uri')->end()
                                ->end()
                            ->end()
                            ->scalarNode('encoding')->isRequired()->end()
                            ->scalarNode('author')->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;
    }
203894
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $twig    = $builder->root('twig');
        {
            $twig->children()->scalarNode('template_dir');
            $twig->children()->scalarNode('cache_dir')->defaultValue(null);
            $twig->children()->scalarNode('asset_base')->defaultValue('');
            $twig->children()->variableNode('globals')->defaultValue([]);
        }

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

		$treeBuilder->root('framework')
				->children()
					->append($this->getLocalesDefinition())
					->append($this->getDoctrineDefinition())
					->append($this->getAuditDefinition())
					->append($this->getSessionDefinition())
					->append($this->getMailerDefinition())
					->append($this->getServicesDefinition())
				->end();

		return $treeBuilder;
	}
736186
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode    = $treeBuilder->root($this->rootName);

        $rootNode
            ->children()
                ->booleanNode('use_doctrine_orm')->defaultFalse()->end()
                ->booleanNode('use_doctrine_odm')->defaultFalse()->end()
                ->booleanNode('use_propel')->defaultFalse()->end()
                ->booleanNode('use_jms_security')->defaultFalse()->end()
                ->booleanNode('guess_required')->defaultTrue()->end()
                ->booleanNode('default_required')->defaultTrue()->end()
                ->booleanNode('overwrite_if_exists')->defaultFalse()->end()
                ->booleanNode('throw_exceptions')->defaultFalse()->end()
                ->scalarNode('base_admin_template')
                    ->defaultValue("AdmingeneratorGeneratorBundle::base.html.twig")
                ->end()
                ->scalarNode('dashboard_route')->defaultNull()->end()
                ->scalarNode('login_route')->defaultNull()->end()
                ->scalarNode('logout_route')->defaultNull()->end()
                ->scalarNode('exit_route')->defaultNull()->end()
                ->scalarNode('generator_cache')->defaultNull()->end()
                ->scalarNode('default_action_after_save')->defaultValue('edit')->end()
                ->scalarNode('knp_menu_alias')->defaultNull()->end()
                ->booleanNode('use_doctrine_orm_batch_remove')->defaultFalse()->end()
                ->booleanNode('use_doctrine_odm_batch_remove')->defaultFalse()->end()
                ->booleanNode('use_propel_batch_remove')->defaultFalse()->end()
                ->arrayNode('twig')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('use_form_resources')->defaultTrue()->end()
                        ->booleanNode('use_localized_date')->defaultFalse()->end()
                        ->scalarNode('date_format')->defaultValue('Y-m-d')->end()
                        ->scalarNode('datetime_format')->defaultValue('Y-m-d H:i:s')->end()
                        ->scalarNode('localized_date_format')->defaultValue('medium')->end()
                        ->scalarNode('localized_datetime_format')->defaultValue('medium')->end()
                        ->arrayNode('number_format')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('decimal')->defaultValue(0)->end()
                                ->scalarNode('decimal_point')->defaultValue('.')->end()
                                ->scalarNode('thousand_separator')->defaultValue(',')->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('templates_dirs')
                    ->prototype('scalar')->end()
                ->end()
                ->arrayNode('form_types')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('doctrine_orm')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                            ->defaultValue($this->defaultFormTypes['doctrine_orm'])
                            ->validate()
                            ->ifNotInArray(array_keys($this->defaultFormTypes['doctrine_orm']))
                                ->then(function($v) {
                                    return array_merge($this->defaultFormTypes['doctrine_orm'], $v);
                                })
                            ->end()
                        ->end()
                        ->arrayNode('doctrine_odm')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                            ->defaultValue($this->defaultFormTypes['doctrine_odm'])
                            ->validate()
                            ->ifNotInArray(array_values($this->defaultFormTypes['doctrine_odm']))
                                ->then(function ($v){
                                    return array_merge($this->defaultFormTypes['doctrine_odm'], $v);
                                })
                            ->end()
                        ->end()
                        ->arrayNode('propel')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                            ->defaultValue($this->defaultFormTypes['propel'])
                            ->validate()
                            ->ifNotInArray(array_values($this->defaultFormTypes['propel']))
                                ->then(function ($v){
                                    return array_merge($this->defaultFormTypes['propel'], $v);
                                })
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('filter_types')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('doctrine_orm')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                            ->defaultValue($this->defaultFilterTypes['doctrine_orm'])
                            ->validate()
                            ->ifNotInArray(array_values($this->defaultFilterTypes['doctrine_orm']))
                                ->then(function ($v){
                                    return array_merge($this->defaultFilterTypes['doctrine_orm'], $v);
                                })
                            ->end()
                        ->end()
                        ->arrayNode('doctrine_odm')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                            ->defaultValue($this->defaultFilterTypes['doctrine_odm'])
                            ->validate()
                            ->ifNotInArray(array_keys($this->defaultFilterTypes['doctrine_odm']))
                                ->then(function ($v){
                                    return array_merge($this->defaultFilterTypes['doctrine_odm'], $v);
                                })
                            ->end()
                        ->end()
                        ->arrayNode('propel')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                            ->defaultValue($this->defaultFilterTypes['propel'])
                            ->validate()
                            ->ifNotInArray(array_values($this->defaultFilterTypes['propel']))
                                ->then(function ($v){
                                    return array_merge($this->defaultFilterTypes['propel'], $v);
                                })
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->append($this->getStylesheetNode())
                ->append($this->getJavascriptsNode())
            ->end();

        return $treeBuilder;
    }
480641
public function getConfigTreeBuilder(): TreeBuilder
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('flows');
        $rootNode
            ->useAttributeAsKey('name')
            ->arrayPrototype()
                ->children()
                    ->scalarNode('description')->isRequired()->cannotBeEmpty()->end()
                    ->arrayNode('producer')
                        ->children()
                            ->scalarNode('service')->isRequired()->end()
                        ->end()
                    ->end()
                    ->arrayNode('worker')
                        ->children()
                            ->scalarNode('service')->isRequired()->end()
                            ->integerNode('instances')->min(1)->defaultValue(1)->end()
                            ->integerNode('release_delay')->min(0)->defaultValue(0)->end()
                            ->integerNode('max_retry')->min(1)->defaultValue(5)->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ;
        return $treeBuilder;
    }
1291957
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('open_orchestra_front');

        $rootNode->children()
            ->arrayNode('devices')
                ->useAttributeAsKey('name')
                ->prototype('array')
                    ->children()
                        ->scalarNode('parent')->defaultNull()->end()
                    ->end()
                ->end()
            ->end()
            ->append($this->addTemplateSetConfiguration())
            ->scalarNode('device_type_field')->defaultValue('x-ua-device')->end()
        ->end();

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

        $this->addRepositoriesSection($rootNode);
        $this->addSiteaccessSection($rootNode);
        $this->addImageMagickSection($rootNode);
        $this->addHttpCacheSection($rootNode);
        $this->addPageSection($rootNode);
        $this->addRouterSection($rootNode);
        $this->addRichTextSection($rootNode);
        $this->addUrlAliasSection($rootNode);
        $this->addImagePlaceholderSection($rootNode);

        // Delegate SiteAccess config to configuration parsers
        $this->mainConfigParser->addSemanticConfig($this->generateScopeBaseNode($rootNode));

        return $treeBuilder;
    }
674384
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('bazinga_geocoder');

        $this->getRootNode($treeBuilder, 'bazinga_geocoder')
            ->children()
            ->append($this->getProvidersNode())
            ->arrayNode('profiling')
                ->addDefaultsIfNotSet()
                ->treatFalseLike(['enabled' => false])
                ->treatTrueLike(['enabled' => true])
                ->treatNullLike(['enabled' => $this->debug])
                ->info('Extend the debug profiler with information about requests.')
                ->children()
                    ->booleanNode('enabled')
                        ->info('Turn the toolbar on or off. Defaults to kernel debug mode.')
                        ->defaultValue($this->debug)
                    ->end()
                ->end()
            ->end()
            ->arrayNode('fake_ip')
                ->beforeNormalization()
                ->ifString()
                    ->then(function ($value) {
                        return ['ip' => $value];
                    })
                ->end()
                ->canBeEnabled()
                ->children()
                    ->scalarNode('ip')->defaultNull()->end()
                ->end()
            ->end();

        return $treeBuilder;
    }
283828
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $root = $treeBuilder->root('chameleon_system_sanity_check');

        $root
            ->canBeDisabled()
            ->children()
                ->append($this->getOutputConfiguration())
            ->end();

        return $treeBuilder;
    }
430833
public function getConfigTreeBuilder()
    {
        $builder = new TreeBuilder();
        $routing = $builder->root('routing');
        {
            $routing->children()->scalarNode('path');
            $routing->children()->scalarNode('cache_dir')->defaultValue(null);
            $routing->children()->variableNode('namespaces')->beforeNormalization()->ifString()->then(
                function ($v) {
                    return [$v];
                }
            );
        }

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

		$treeBuilder->root('cms_authentication')
			->children()
				->append($this->getPathConfiguration())
				->append($this->getSessionConfiguration())
				->append($this->getUsersConfiguration())
				->append($this->getServicesDefinition())
			->end();

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

        $rootNode->children()
            ->append($this->addSessionSupportSection())
            ->append($this->addDoctrineSection())
            ->append($this->addRouterSection())
            ->append($this->addAnnotationSection())
            ->append($this->addSerializerSection())
            ->append($this->addValidationSection())
            ->append($this->addLoggingSection())
            ->append($this->addDataCollectorSection())
            ->end();

        return $treeBuilder;
    }