1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-15 19:42:08 +00:00

Language selection on config screen

This commit is contained in:
Nicolas Lœuillet 2015-10-01 16:28:38 +02:00 committed by Jeremy Benoist
parent 3d3ed955f1
commit c89d35e851
11 changed files with 136 additions and 12 deletions

View file

@ -0,0 +1,25 @@
<?php
namespace Wallabag\CoreBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('wallabag_core');
$rootNode
->children()
->arrayNode('languages')
->prototype('scalar')->end()
->end()
->end()
;
return $treeBuilder;
}
}

View file

@ -11,6 +11,10 @@ class WallabagCoreExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('wallabag_core.languages', $config['languages']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}