Generates the configuration tree builder.

@return TreeBuilder The tree builder
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;
    }
689837
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('sentry');
        /** @var ArrayNodeDefinition $rootNode */
        $rootNode = \method_exists(TreeBuilder::class, 'getRootNode')
            ? $treeBuilder->getRootNode()
            : $treeBuilder->root('sentry');

        // Basic Sentry configuration
        $rootNode->children()
            ->scalarNode('dsn')
            ->defaultNull()
            ->beforeNormalization()
            ->ifString()
            ->then($this->getTrimClosure());

        // Options array (to be passed to Sentry\Options constructor) -- please keep alphabetical order!
        $optionsNode = $rootNode->children()
            ->arrayNode('options')
            ->addDefaultsIfNotSet();

        $defaultValues = new Options();
        $optionsChildNodes = $optionsNode->children();

        $optionsChildNodes->booleanNode('attach_stacktrace');
        $optionsChildNodes->variableNode('before_breadcrumb')
            ->validate()
            ->ifTrue($this->isNotAValidCallback())
            ->thenInvalid('Expecting callable or service reference, got %s');
        $optionsChildNodes->variableNode('before_send')
            ->validate()
            ->ifTrue($this->isNotAValidCallback())
            ->thenInvalid('Expecting callable or service reference, got %s');
        if (PrettyVersions::getVersion('sentry/sentry')->getPrettyVersion() !== '2.0.0') {
            $optionsChildNodes->booleanNode('capture_silenced_errors');
        }
        $optionsChildNodes->integerNode('context_lines')
            ->min(0)
            ->max(99);
        $optionsChildNodes->booleanNode('default_integrations');
        $optionsChildNodes->booleanNode('enable_compression');
        $optionsChildNodes->scalarNode('environment')
            ->defaultValue('%kernel.environment%')
            ->cannotBeEmpty();
        $optionsChildNodes->scalarNode('error_types');
        $optionsChildNodes->arrayNode('in_app_exclude')
            ->defaultValue([
                '%kernel.cache_dir%',
                $this->getProjectRoot() . '/vendor',
            ])
            ->prototype('scalar');
        $optionsChildNodes->arrayNode('excluded_exceptions')
            ->defaultValue($defaultValues->getExcludedExceptions())
            ->prototype('scalar');
        $optionsChildNodes->scalarNode('http_proxy');
        $optionsChildNodes->arrayNode('integrations')
            ->prototype('scalar')
            ->validate()
            ->ifTrue(function ($value): bool {
                if (! is_string($value)) {
                    return true;
                }

                return '@' !== substr($value, 0, 1);
            })
            ->thenInvalid('Expecting service reference, got %s');
        $optionsChildNodes->scalarNode('logger');
        $optionsChildNodes->integerNode('max_breadcrumbs')
            ->min(1);
        $optionsChildNodes->integerNode('max_value_length')
            ->min(1);
        $optionsChildNodes->arrayNode('prefixes')
            ->defaultValue($defaultValues->getPrefixes())
            ->prototype('scalar');
        $optionsChildNodes->scalarNode('project_root')
            ->defaultValue($this->getProjectRoot());
        $optionsChildNodes->scalarNode('release');
        $optionsChildNodes->floatNode('sample_rate')
            ->min(0.0)
            ->max(1.0);
        $optionsChildNodes->integerNode('send_attempts')
            ->min(1);
        $optionsChildNodes->booleanNode('send_default_pii');
        $optionsChildNodes->scalarNode('server_name');
        $optionsChildNodes->arrayNode('tags')
            ->normalizeKeys(false)
            ->prototype('scalar');

        // Bundle-specific configuration
        $listenerPriorities = $rootNode->children()
            ->arrayNode('listener_priorities')
            ->addDefaultsIfNotSet()
            ->children();
        $listenerPriorities->scalarNode('request')
            ->defaultValue(1);
        $listenerPriorities->scalarNode('sub_request')
            ->defaultValue(1);
        $listenerPriorities->scalarNode('console')
            ->defaultValue(1);
        $listenerPriorities->scalarNode('request_error')
            ->defaultValue(128);
        $listenerPriorities->scalarNode('console_error')
            ->defaultValue(128);

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

        $rootNode
            ->children()
                ->arrayNode('services')
                    ->children()
                        ->arrayNode('blob')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                        ->end()
                        ->arrayNode('table')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                        ->end()
                        ->arrayNode('queue')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                        ->end()
                        ->arrayNode('service_bus')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                        ->end()
                        ->arrayNode('management')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('deployment')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('roleFiles')
                            ->children()
                                ->scalarNode('ignoreVCS')
                                    ->defaultValue(true)
                                ->end()
                                ->variableNode('include')
                                    ->defaultValue(array())
                                ->end()
                                ->variableNode('exclude')
                                    ->defaultValue(array())
                                ->end()
                                ->variableNode('ignorePatterns')
                                    ->defaultValue(array())
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('streams')
                    ->useAttributeAsKey('name')
                    ->prototype('scalar')->end()
                ->end()
                ->arrayNode('key_value_store')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('connection_name')
                            ->defaultValue('')
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('session')
                    ->children()
                        ->scalarNode('type')
                            ->validate()
                                ->ifNotInArray(array('pdo'))
                                ->thenInvalid('Only pdo allowed here.')
                            ->end()
                        ->end()
                        ->arrayNode('database')
                            ->children()
                                ->scalarNode('host')->isRequired()->end()
                                ->scalarNode('username')->isRequired()->end()
                                ->scalarNode('password')->isRequired()->end()
                                ->scalarNode('database')->isRequired()->end()
                                ->scalarNode('table')->defaultValue('azure_sessions')->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('assets')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('type')
                            ->defaultValue('local')
                            ->validate()
                                ->ifNotInArray(array(
                                    'local',
                                    'blob',
                                    'service'
                                ))
                                ->thenInvalid('Assets can either deployed on local "webrole" or in "blob" storage.')
                            ->end()
                        ->end()
                        ->scalarNode('id')->end()
                        ->scalarNode('connection_name')->end()
                    ->end()
                ->end()
                ->arrayNode('federations')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                    ->children()
                        ->scalarNode('federationName')->isRequired()->end()
                        ->scalarNode('distributionKey')->isRequired()->end()
                        ->scalarNode('distributionType')->isRequired()->end()
                        ->scalarNode('filteringEnabled')->defaultValue(false)->end()
                    ->end()
                ->end()
            ->end()
        ->end();

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

        $root
            ->children()
                ->arrayNode('username_mapper')
                    ->defaultValue([
                        ClaimTypes::EMAIL_ADDRESS,
                        ClaimTypes::ADFS_1_EMAIL,
                        ClaimTypes::COMMON_NAME,
                        ClaimTypes::WINDOWS_ACCOUNT_NAME,
                        'urn:oid:0.9.2342.19200300.100.1.3',
                        'uid',
                        'urn:oid:1.3.6.1.4.1.5923.1.1.1.6',
                        SimpleUsernameMapper::NAME_ID,
                    ])
                    ->prototype('scalar')->end()
                ->end()
            ->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();
    }
577486
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('kitpages_file');

        $this->addMainSection($rootNode);

        return $treeBuilder;
    }
1130503
public function getConfigTreeBuilder(): TreeBuilder
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('bkstg_core');

        $rootNode
            ->children()
                ->arrayNode('cdn')
                    ->children()
                        ->scalarNode('bucket')->isRequired()->end()
                        ->scalarNode('client')->defaultValue('bkstg.core.adapter.service.do_spaces')->end()
                    ->end()
                ->end()
                ->arrayNode('filesystem')
                    ->children()
                        ->scalarNode('directory')->defaultValue('')->end()
                        ->scalarNode('bucket')->isRequired()->end()
                        ->scalarNode('accessKey')->isRequired()->end()
                        ->scalarNode('secretKey')->isRequired()->end()
                        ->scalarNode('region')->isRequired()->end()
                        ->scalarNode('endpoint')->defaultNull()->end()
                        ->scalarNode('create')->defaultValue(false)->end()
                        ->scalarNode('storage')
                            ->defaultValue('standard')
                            ->validate()
                            ->ifNotInArray(['standard', 'reduced'])
                                ->thenInvalid('Invalid storage type - "%s"')
                            ->end()
                        ->end()
                        ->scalarNode('cache_control')->defaultValue('')->end()
                        ->scalarNode('acl')
                            ->defaultValue('public')
                            ->validate()
                            ->ifNotInArray([
                                'private',
                                'public',
                                'open',
                                'auth_read',
                                'owner_read',
                                'owner_full_control',
                            ])
                                ->thenInvalid('Invalid acl permission - "%s"')
                            ->end()
                        ->end()
                        ->scalarNode('encryption')
                            ->defaultValue('')
                            ->validate()
                            ->ifNotInArray(['aes256'])
                                ->thenInvalid('Invalid encryption type - "%s"')
                            ->end()
                        ->end()
                        ->scalarNode('version')->defaultValue('latest')->end()
                        ->enumNode('sdk_version')
                            ->values([2, 3])
                            ->defaultValue(3)
                        ->end()
                        ->arrayNode('meta')
                            ->useAttributeAsKey('name')
                            ->prototype('scalar')
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ;

        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()
        ;
    }
670201
public function getConfigTreeBuilder(): TreeBuilder
    {
        $rootName = $this->getRootName();
        if (method_exists(TreeBuilder::class, 'getRootNode')) {
            $treeBuilder = /* @scrutinizer ignore-call */ new TreeBuilder($rootName);
            $rootNode = /* @scrutinizer ignore-call */ $treeBuilder->getRootNode();
        } else {
            $treeBuilder = new TreeBuilder();
            $rootNode = $treeBuilder->Root($rootName);
        }
        $this->build($rootNode);

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

        $filterDefinition = $rootNode
            ->children()
                ->arrayNode('configurations')
                    ->prototype('array')
                        ->children();

        $this->appendFilterDefinition($filterDefinition);

        $filterDefinition->end()
                    ->end()
                ->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;
    }
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;
    }
38346
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('blablacar_redis');

        $rootNode
            ->children()
                ->arrayNode('clients')
                    ->isRequired()
                    ->requiresAtLeastOneElement()
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('host')->defaultValue('127.0.0.1')->cannotBeEmpty()->end()
                            ->integerNode('port')->defaultValue(6379)->end()
                            ->integerNode('base')->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('session')
                    ->canBeUnset()
                    ->children()
                        ->scalarNode('client')->isRequired()->end()
                        ->scalarNode('prefix')->defaultValue('session')->cannotBeEmpty()->end()
                        ->integerNode('ttl')->end()
                        ->integerNode('spin_lock_wait')->defaultValue(150000)->end()
                        ->integerNode('lock_max_wait')->defaultValue(500000)->end()
                    ->end()
                ->end()
                ->booleanNode('enable_logger')->defaultTrue()->end()
            ->end()
        ;

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

        $rootNode->children()
            ->scalarNode("baseUrl")->defaultValue("https://primeadv.go2cloud.org/")->end()
            ->integerNode("id")->isRequired()->end()
            ->end();

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

        $this->addDebugNode($rootNode);
        $this->addRequestMatcherNode($rootNode);
        $this->addSerializer($rootNode);
        $this->addPostMessageOriginNode($rootNode);
        $this->addResponseModel($rootNode);

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

		$treeBuilder->root('cms')
			->children()
				->scalarNode('prefix')->isRequired()->end()
				->scalarNode('active_theme')->end()
				->arrayNode('cms_resources')
					->children()
						->arrayNode('css_pack')->prototype('scalar')->end()->end()
						->arrayNode('js_pack')->prototype('scalar')->end()->end()
					->end()
				->end()
				->append($this->getServicesDefinition())
			->end();

		return $treeBuilder;
	}