vendor/willdurand/js-translation-bundle/DependencyInjection/Configuration.php line 22

Open in your IDE?
  1. <?php
  2. namespace Bazinga\Bundle\JsTranslationBundle\DependencyInjection;
  3. use Symfony\Component\Config\Definition\ConfigurationInterface;
  4. use Symfony\Component\Config\Definition\Builder\TreeBuilder;
  5. /**
  6.  * @author William DURAND <william.durand1@gmail.com>
  7.  */
  8. class Configuration implements ConfigurationInterface
  9. {
  10.     /**
  11.      * Generates the configuration tree builder.
  12.      *
  13.      * @return TreeBuilder The tree builder
  14.      */
  15.     public function getConfigTreeBuilder()
  16.     {
  17.         $builder = new TreeBuilder();
  18.         $builder->root('bazinga_js_translation')
  19.             ->fixXmlConfig('active_locale')
  20.             ->fixXmlConfig('active_domain')
  21.             ->children()
  22.                 ->scalarNode('locale_fallback')->defaultValue('en')->end()
  23.                 ->scalarNode('default_domain')->defaultValue('messages')->end()
  24.                 ->scalarNode('http_cache_time')->defaultValue('86400')->end()
  25.                 ->arrayNode('active_locales')
  26.                     ->prototype('scalar')
  27.                     ->end()
  28.                 ->end()
  29.                 ->arrayNode('active_domains')
  30.                     ->prototype('scalar')
  31.                     ->end()
  32.                 ->end()
  33.             ->end();
  34.         return $builder;
  35.     }
  36. }