Build predis node configuration definition

@return \Symfony\Component\Config\Definition\Builder\TreeBuilder
974456
private function addPredisNode()
    {
        $builder = new TreeBuilder('predis');
        $node    = $this->getRootNode($builder, 'predis');

        $node
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('client_id')->defaultNull()->end()
                ->scalarNode('scheme')->defaultValue('tcp')->end()
                ->scalarNode('host')->defaultValue('%doctrine_cache.redis.host%')->end()
                ->scalarNode('port')->defaultValue('%doctrine_cache.redis.port%')->end()
                ->scalarNode('password')->defaultNull()->end()
                ->scalarNode('timeout')->defaultNull()->end()
                ->scalarNode('database')->defaultNull()->end()
                ->arrayNode('options')
                  ->useAttributeAsKey('name')
                  ->prototype('scalar')->end()
                ->end()
            ->end()
        ;

        return $node;
    }
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;
    }
852932
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root($this->alias);

        $rootNode
            ->children()
                ->arrayNode('admin')
                    ->children()
                        ->arrayNode('form')
                            ->prototype('array')
                                ->prototype('array')
                                    ->children()
                                        ->scalarNode('form')->isRequired()->cannotBeEmpty()->end()
                                    ->end()
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('wrap')
                    ->fixXmlConfig('pattern')
                    ->children()
                        ->arrayNode('patterns')
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('orm')
                    ->children()
                        ->scalarNode('entity_manager')
                            ->defaultNull()
                            ->cannotBeEmpty()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('install')
                    ->useAttributeAsKey('name')
                    ->prototype('array')
                        ->prototype('array')
                            ->children()
                                ->scalarNode('resource')->end()
                                ->scalarNode('target')->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('override')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('class')
                                ->isRequired()
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('override')
                                ->defaultValue(null)
                            ->end()
                            ->scalarNode('file')
                                ->isRequired()
                                ->cannotBeEmpty()
                            ->end()
                            ->enumNode('static')
                                ->defaultValue('self')
                                ->values(['self', 'static'])
                            ->end()
                        ->end()
                    ->end()
                ->end()
                ->variableNode('config')
                ->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;
    }
1210492
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $treeBuilder->root('e_xpansion_admin_groups')
            ->children()
                ->arrayNode('groups')
                    ->prototype('array')
                        ->children()
                            ->variableNode('label')->end()
                            ->arrayNode('logins')->prototype('scalar')->end()->end()
                            ->arrayNode('permissions')->prototype('scalar')->end()->end()
                        ->end()
                    ->end()
                ->end()
                ->arrayNode('permissions')
                    ->prototype('scalar')->end()
                ->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;
    }
408122
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('terrific_composer');

        $rootNode
            ->children()
                ->scalarNode('toolbar')->defaultFalse()->end()
                ->arrayNode('composition_bundles')
                    ->defaultValue(array('@TerrificComposition'))
                    ->beforeNormalization()
                        ->ifTrue(function($v){ return !is_array($v); })
                        ->then(function($v){ return array($v); })
                    ->end()
                    ->beforeNormalization()
                        ->always()
                        ->then(function($v) {
                            $bundles = array();

                            // trim and add @ if not existent
                            foreach ($v as $key => $bundle) {
                                $bundle = trim($bundle);

                                if(strpos($bundle, '@') === false) {
                                    $bundle = '@'.$bundle;
                                }
                                $bundles[$key] = $bundle;
                            }

                            return $bundles;
                        })
                    ->end()
                    ->prototype('scalar')->end()
                ->end()
                ->scalarNode('module_layout')
                    ->beforeNormalization()
                        ->always()
                        ->then(function($v) {
                            return str_replace('@', '', $v);
                        })
                    ->end()
                    ->defaultValue('TerrificComposition::base.html.twig')
                ->end()
                ->scalarNode('module_template')
                    ->beforeNormalization()
                        ->always()
                        ->then(function($v) {
                            return str_replace('@', '', $v);
                        })
                    ->end()
                    ->defaultValue(null)
                ->end()
            ->end()
        ;

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

        $rootNode
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('default_locale')->defaultValue('en')->end()

                ->arrayNode('classes')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('config')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('model')->defaultValue('Opifer\CmsBundle\Entity\Config')->end()
                            ->end()
                        ->end()
                        ->arrayNode('review')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('model')->defaultValue('Opifer\CmsBundle\Entity\Review')->end()
                            ->end()
                        ->end()
                        ->arrayNode('user')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('model')->defaultValue('Opifer\CmsBundle\Entity\User')->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()

                ->arrayNode('database')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('driver')->defaultValue('pdo_mysql')->end()
                        ->scalarNode('host')->defaultValue('%database_host%')->end()
                        ->scalarNode('name')->defaultValue('%database_name%')->end()
                        ->scalarNode('user')->defaultValue('%database_user%')->end()
                        ->scalarNode('password')->defaultValue('%database_password%')->end()
                        ->scalarNode('table_prefix')->defaultValue('opifer_')->end()
                    ->end()
                ->end()

                ->arrayNode('autocomplete')
                    ->useAttributeAsKey('id')
                    ->prototype('array')
                        ->children()
                            ->scalarNode('class')
                                ->cannotBeEmpty()
                            ->end()
                            ->scalarNode('property')
                                ->cannotBeEmpty()
                            ->end()
                        ->end()
                    ->end()
                ->end()

                ->arrayNode('ckeditor')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('css_path')->defaultValue('/bundles/opifercms/css/app.css')->end()
                    ->end()
                ->end()

                ->arrayNode('blocks')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->arrayNode('login')
                            ->addDefaultsIfNotSet()
                            ->children()
                                ->scalarNode('view')->defaultValue('OpiferCmsBundle:Block:Content/login.html.twig')->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()

                ->scalarNode('google_tag_manager_key')->defaultNull()->end()
                ->scalarNode('google_captcha_site_key')->defaultNull()->end()
                ->scalarNode('google_captcha_secret')->defaultNull()->end()

            ->end()
        ;

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

        $rootNode
            ->children()
                ->arrayNode('bundles')
                    ->prototype('scalar')->isRequired()->end()
                    ->defaultValue(array())
                ->end()
                ->scalarNode('persister')->defaultValue('orm')->end()
                ->scalarNode('persister_id')->defaultValue(null)->end()
                ->arrayNode('defaults')
                    ->children()
                        ->scalarNode('converter')->defaultValue('default')->end()
                        ->arrayNode('validation')
                            ->children()
                                ->scalarNode('enable')->defaultValue(true)->end()
                                ->scalarNode('group')->defaultValue('Default')->end()
                            ->end()
                        ->end()
                        ->arrayNode('parameters')->end()
                    ->end()
                ->end()
            ->end()
        ;

        return $treeBuilder->buildTree();
    }
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;
	}
1323735
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $this->root = $treeBuilder->root("rms_push_notifications");

        $this->addAndroid();
        $this->addiOS();
        $this->addMac();
        $this->addBlackberry();
        $this->addWindowsphone();

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

        return $tb
            ->root('atoum_atoum')
                ->children()
                    ->arrayNode('bundles')
                        ->useAttributeAsKey('name')
                        ->prototype('array')
                            ->children()
                                ->arrayNode('directories')
                                    ->defaultValue(array(
                                        'Tests/Units', 'Tests/Controller',
                                    ))
                                    ->prototype('scalar')
                                    ->end()
                                ->end()
                            ->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ;
    }
1080259
protected function setupRootNode()
    {
        $builder = new TreeBuilder();
        $this->rootNode = $builder->root($this->getBundleName());

        return $this;
    }
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;
    }
960826
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('fos_rest');

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

        $rootNode
            ->children()
                ->scalarNode('disable_csrf_role')->defaultNull()->end()
                ->arrayNode('access_denied_listener')
                    ->canBeEnabled()
                    ->beforeNormalization()
                        ->ifArray()->then(function ($v) {
                            if (!empty($v) && empty($v['formats'])) {
                                unset($v['enabled']);
                                $v = ['enabled' => true, 'formats' => $v];
                            }

                            return $v;
                        })
                    ->end()
                    ->fixXmlConfig('format', 'formats')
                    ->children()
                        ->scalarNode('service')->defaultNull()->end()
                        ->arrayNode('formats')
                            ->useAttributeAsKey('name')
                            ->prototype('boolean')->end()
                        ->end()
                    ->end()
                ->end()
                ->scalarNode('unauthorized_challenge')->defaultNull()->end()
                ->arrayNode('param_fetcher_listener')
                    ->beforeNormalization()
                        ->ifString()
                        ->then(function ($v) {
                            return ['enabled' => in_array($v, ['force', 'true']), 'force' => 'force' === $v];
                        })
                    ->end()
                    ->canBeEnabled()
                    ->children()
                        ->booleanNode('force')->defaultFalse()->end()
                        ->scalarNode('service')->defaultNull()->end()
                    ->end()
                ->end()
                ->scalarNode('cache_dir')->cannotBeEmpty()->defaultValue('%kernel.cache_dir%/fos_rest')->end()
                ->arrayNode('allowed_methods_listener')
                    ->canBeEnabled()
                    ->children()
                        ->scalarNode('service')->defaultNull()->end()
                    ->end()
                ->end()
                ->arrayNode('routing_loader')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('default_format')->defaultNull()->end()
                        ->scalarNode('prefix_methods')->defaultTrue()->end()
                        ->scalarNode('include_format')->defaultTrue()->end()
                    ->end()
                ->end()
                ->arrayNode('body_converter')
                    ->canBeEnabled()
                    ->children()
                        ->scalarNode('validate')
                            ->defaultFalse()
                            ->beforeNormalization()
                                ->ifTrue()
                                ->then(function ($value) {
                                    if (!class_exists(OptionsResolver::class)) {
                                        throw new InvalidConfigurationException("'body_converter.validate: true' requires OptionsResolver component installation ( composer require symfony/options-resolver )");
                                    }

                                    return $value;
                                })
                            ->end()
                        ->end()
                        ->scalarNode('validation_errors_argument')->defaultValue('validationErrors')->end()
                    ->end()
                ->end()
                ->arrayNode('service')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('router')->defaultValue('router')->end()
                        ->scalarNode('templating')->defaultValue('templating')->end()
                        ->scalarNode('serializer')->defaultNull()->end()
                        ->scalarNode('view_handler')->defaultValue('fos_rest.view_handler.default')->end()
                        ->scalarNode('inflector')->defaultValue('fos_rest.inflector.doctrine')->end()
                        ->scalarNode('validator')->defaultValue('validator')->end()
                    ->end()
                ->end()
                ->arrayNode('serializer')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('version')->defaultNull()->end()
                        ->arrayNode('groups')
                            ->prototype('scalar')->end()
                        ->end()
                        ->booleanNode('serialize_null')->defaultFalse()->end()
                    ->end()
                ->end()
                ->arrayNode('zone')
                    ->cannotBeOverwritten()
                    ->prototype('array')
                    ->fixXmlConfig('ip')
                    ->children()
                        ->scalarNode('path')
                            ->defaultNull()
                            ->info('use the urldecoded format')
                            ->example('^/path to resource/')
                        ->end()
                        ->scalarNode('host')->defaultNull()->end()
                        ->arrayNode('methods')
                            ->beforeNormalization()->ifString()->then(function ($v) {
                                return preg_split('/\s*,\s*/', $v);
                            })->end()
                            ->prototype('scalar')->end()
                        ->end()
                        ->arrayNode('ips')
                            ->beforeNormalization()->ifString()->then(function ($v) {
                                return array($v);
                            })->end()
                            ->prototype('scalar')->end()
                        ->end()
                    ->end()
                ->end()
            ->end()
        ->end();

        $this->addViewSection($rootNode);
        $this->addExceptionSection($rootNode);
        $this->addBodyListenerSection($rootNode);
        $this->addFormatListenerSection($rootNode);
        $this->addVersioningSection($rootNode);

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

        $root = $builder->root('req2cmd');
        $root
            ->children()
                ->append($this->addExtractorNode())
                ->append($this->addCommandBusNode())
                ->append($this->addEventListenersNode())
            ->end();

        return $builder;
    }
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;
    }