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:
parent
3d3ed955f1
commit
c89d35e851
11 changed files with 136 additions and 12 deletions
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue