for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the ONGR package.
*
* (c) NFQ Technologies UAB <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ONGR\TranslationsBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from app/config files.
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('ongr_translations');
$rootNode
->addDefaultsIfNotSet()
->children()
->arrayNode('repository')
->info('Repository used for connecting with elasticsearch client.')
->scalarNode('translation')->isRequired()
->end()
->scalarNode('history')->isRequired()
->scalarNode('list_size')
->info('Maximum amount of translations displayed in the list')
->defaultValue(1000)
->arrayNode('locales')
->requiresAtleastOneElement()
->info('Locales to manage (e.g. "en", "de", "en_eur").')
->prototype('scalar')->end()
->arrayNode('bundles')
->info('Bundles to scan for translations.')
->prototype('scalar')
->defaultValue([])
->end();
return $treeBuilder;
}