aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/DependencyInjection
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2015-12-29 09:59:46 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-12-29 11:17:06 +0100
commit23ff8d36199c0cddb5bae4a5010cb71f861eeef8 (patch)
tree0da3a5941c85f80408e49db63ecd3b3ba5347a40 /src/Wallabag/UserBundle/DependencyInjection
parentc997cfcc9c161241a6398b0942a1a869688d807a (diff)
downloadwallabag-23ff8d36199c0cddb5bae4a5010cb71f861eeef8.tar.gz
wallabag-23ff8d36199c0cddb5bae4a5010cb71f861eeef8.tar.zst
wallabag-23ff8d36199c0cddb5bae4a5010cb71f861eeef8.zip
Add custom email for 2FA
Related #1490
Diffstat (limited to 'src/Wallabag/UserBundle/DependencyInjection')
-rw-r--r--src/Wallabag/UserBundle/DependencyInjection/Configuration.php17
-rw-r--r--src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php25
2 files changed, 42 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/DependencyInjection/Configuration.php b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php
new file mode 100644
index 00000000..4223f8db
--- /dev/null
+++ b/src/Wallabag/UserBundle/DependencyInjection/Configuration.php
@@ -0,0 +1,17 @@
1<?php
2
3namespace Wallabag\UserBundle\DependencyInjection;
4
5use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8class Configuration implements ConfigurationInterface
9{
10 public function getConfigTreeBuilder()
11 {
12 $treeBuilder = new TreeBuilder();
13 $rootNode = $treeBuilder->root('wallabag_user');
14
15 return $treeBuilder;
16 }
17}
diff --git a/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php
new file mode 100644
index 00000000..c12a8937
--- /dev/null
+++ b/src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php
@@ -0,0 +1,25 @@
1<?php
2
3namespace Wallabag\UserBundle\DependencyInjection;
4
5use Symfony\Component\DependencyInjection\ContainerBuilder;
6use Symfony\Component\Config\FileLocator;
7use Symfony\Component\HttpKernel\DependencyInjection\Extension;
8use Symfony\Component\DependencyInjection\Loader;
9
10class WallabagUserExtension extends Extension
11{
12 public function load(array $configs, ContainerBuilder $container)
13 {
14 $configuration = new Configuration();
15 $config = $this->processConfiguration($configuration, $configs);
16
17 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
18 $loader->load('services.yml');
19 }
20
21 public function getAlias()
22 {
23 return 'wallabag_user';
24 }
25}