Generates the configuration tree builder.

@return TreeBuilder The tree builder
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;
    }
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;
    }
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;
    }
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;
    }
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;
    }
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;
    }
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;
    }
137079
public function getConfigTree()
    {
        $treeBuilder = new TreeBuilder();
        $rootNode = $treeBuilder->root('mandango', 'array');

        $rootNode
            ->children()
                ->scalarNode('model_dir')->end()
                ->booleanNode('logging')->end()
                ->scalarNode('default_connection')->end()
            ->end()

            ->fixXmlConfig('extra_config_classes_dir')
            ->children()
                ->arrayNode('extra_config_classes_dirs')
                ->prototype('scalar')->end()
            ->end()
        ;

        $this->addConnectionsSection($rootNode);

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

        $this->addIndexerSection($rootNode);
        $this->addIndexesSection($rootNode);
        $this->addSearchdSection($rootNode);

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

        $storages = array(
            StorageInterface::STORAGE_ORM,
            StorageInterface::STORAGE_MONGODB,
            StorageInterface::STORAGE_PROPEL,
        );
        $registrationTypes = array('all', 'files', 'database');
        $inputTypes = array('text', 'textarea');

        $rootNode
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('base_layout')
                    ->cannotBeEmpty()
                    ->defaultValue('@LexikTranslationBundle/layout.html.twig')
                ->end()

                ->arrayNode('fallback_locale')
                    ->isRequired()
                    ->requiresAtLeastOneElement()
                    ->prototype('scalar')->end()
                    ->beforeNormalization()
                        ->ifString()
                        ->then(function ($value) { return array($value); })
                    ->end()
                ->end()

                ->arrayNode('managed_locales')
                    ->isRequired()
                    ->requiresAtLeastOneElement()
                    ->prototype('scalar')->end()
                ->end()

                ->scalarNode('grid_input_type')
                    ->cannotBeEmpty()
                    ->defaultValue('text')
                    ->validate()
                        ->ifNotInArray($inputTypes)
                        ->thenInvalid('The input type "%s" is not supported. Please use one of the following types: '.implode(', ', $inputTypes))
                    ->end()
                ->end()

                ->booleanNode('grid_toggle_similar')
                    ->defaultValue(false)
                ->end()

                ->booleanNode('auto_cache_clean')
                    ->defaultValue(false)
                ->end()

                ->integerNode('auto_cache_clean_interval')
                    ->defaultValue(null)
                ->end()

                ->arrayNode('storage')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('type')
                            ->cannotBeEmpty()
                            ->defaultValue(StorageInterface::STORAGE_ORM)
                            ->validate()
                                ->ifNotInArray($storages)
                                ->thenInvalid('The storage "%s" is not supported. Please use one of the following storage: '.implode(', ', $storages))
                            ->end()
                        ->end()
                        ->scalarNode('object_manager')
                        ->end()
                    ->end()
                ->end()

                ->arrayNode('resources_registration')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->scalarNode('type')
                            ->cannotBeEmpty()
                            ->defaultValue('all')
                            ->validate()
                                ->ifNotInArray($registrationTypes)
                                ->thenInvalid('Invalid registration type "%s". Please use one of the following types: '.implode(', ', $registrationTypes))
                            ->end()
                        ->end()
                        ->booleanNode('managed_locales_only')
                            ->defaultTrue()
                        ->end()
                    ->end()
                ->end()

                ->arrayNode('exporter')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('json_hierarchical_format')
                            ->defaultFalse()
                        ->end()
                        ->booleanNode('use_yml_tree')
                            ->defaultFalse()
                        ->end()
                    ->end()
                ->end()

                ->arrayNode('dev_tools')
                    ->addDefaultsIfNotSet()
                    ->children()
                        ->booleanNode('enable')
                            ->defaultFalse()
                        ->end()
                        ->booleanNode('create_missing')
                            ->defaultFalse()
                        ->end()
                        ->scalarNode('file_format')
                            ->defaultValue('yml')
                        ->end()
                    ->end()
                ->end()

            ->end()
        ;

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

        $this->addErrorSection($rootNode);

        return $treeBuilder;
    }