aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/DependencyInjection
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2016-08-24 11:13:00 +0200
committerGitHub <noreply@github.com>2016-08-24 11:13:00 +0200
commita1ab7d1d32cb69af563fcec4395fce5217f154f7 (patch)
treeffc13a611a862cce7d74bf6d349bbb2468f33049 /src/Wallabag/UserBundle/DependencyInjection
parent1bee9e0760c89756ebab0b67f9ab7efc5c6a709b (diff)
parent8541b3c4fdf35788129483060499fef50818222c (diff)
downloadwallabag-a1ab7d1d32cb69af563fcec4395fce5217f154f7.tar.gz
wallabag-a1ab7d1d32cb69af563fcec4395fce5217f154f7.tar.zst
wallabag-a1ab7d1d32cb69af563fcec4395fce5217f154f7.zip
Merge pull request #2186 from wallabag/addRegistration
Add option to disable registration
Diffstat (limited to 'src/Wallabag/UserBundle/DependencyInjection')
-rw-r--r--src/Wallabag/UserBundle/DependencyInjection/Configuration.php8
-rw-r--r--src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php
index 4223f8db..971ce1a0 100644
--- a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php
+++ b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php
@@ -12,6 +12,14 @@ class Configuration implements ConfigurationInterface
12 $treeBuilder = new TreeBuilder(); 12 $treeBuilder = new TreeBuilder();
13 $rootNode = $treeBuilder->root('wallabag_user'); 13 $rootNode = $treeBuilder->root('wallabag_user');
14 14
15 $rootNode
16 ->children()
17 ->booleanNode('registration_enabled')
18 ->defaultValue(true)
19 ->end()
20 ->end()
21 ;
22
15 return $treeBuilder; 23 return $treeBuilder;
16 } 24 }
17} 25}
diff --git a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php
index c12a8937..99040f69 100644
--- a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php
+++ b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php
@@ -16,6 +16,7 @@ class WallabagUserExtension extends Extension
16 16
17 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 17 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
18 $loader->load('services.yml'); 18 $loader->load('services.yml');
19 $container->setParameter('wallabag_user.registration_enabled', $config['registration_enabled']);
19 } 20 }
20 21
21 public function getAlias() 22 public function getAlias()