src/DependencyInjection/Configuration.php
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder();
        $root = $treeBuilder->root('happyr_translation');

        $root->children()
            ->enumNode('translation_service')->values(array('blackhole', 'filesystem', 'loco'))->defaultValue('loco')->end()
            ->scalarNode('target_dir')->defaultValue('%kernel.root_dir%/Resources/translations')->end()
            ->scalarNode('httplug_client')->defaultValue('httplug.client')->cannotBeEmpty()->end()
            ->scalarNode('httplug_message_factory')->defaultValue('httplug.message_factory')->cannotBeEmpty()->end()
            ->booleanNode('sync_empty_translations')->defaultTrue()->end()
            ->booleanNode('auto_add_assets')->defaultFalse()->end()
            ->booleanNode('allow_edit')->defaultTrue()->end()
            ->enumNode('file_extension')->values(array('csv', 'ini', 'json', 'mo', 'php', 'po', 'qt', 'yml', 'xlf'))->defaultValue('xlf')->end()
            ->arrayNode('locales')
                ->requiresAtLeastOneElement()
                ->prototype('scalar')->end()
            ->end()
            ->arrayNode('domains')
                ->requiresAtLeastOneElement()
                ->prototype('scalar')->end()
            ->end()
            ->append($this->getProjectNode())
        ->end();

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

        $root->children()
            ->enumNode('translation_service')->values(array('blackhole', 'filesystem', 'loco'))->defaultValue('loco')->end()
            ->scalarNode('target_dir')->defaultValue('%kernel.root_dir%/Resources/translations')->end()
            ->scalarNode('httplug_client')->defaultValue('httplug.client')->cannotBeEmpty()->end()
            ->scalarNode('httplug_message_factory')->defaultValue('httplug.message_factory')->cannotBeEmpty()->end()
            ->booleanNode('sync_empty_translations')->defaultTrue()->end()
            ->booleanNode('auto_add_assets')->defaultFalse()->end()
            ->booleanNode('allow_edit')->defaultTrue()->end()
            ->enumNode('file_extension')->values(array('csv', 'ini', 'json', 'mo', 'php', 'po', 'qt', 'yml', 'xlf'))->defaultValue('xlf')->end()
            ->arrayNode('locales')
                ->requiresAtLeastOneElement()
                ->prototype('scalar')->end()
            ->end()
            ->arrayNode('domains')
                ->requiresAtLeastOneElement()
                ->prototype('scalar')->end()
            ->end()
            ->append($this->getProjectNode())
        ->end();

        return $treeBuilder;
    }
{@inheritdoc}