diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-12-29 20:32:58 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-12-29 20:32:58 +0100 |
commit | e6a228c43bf98f64d2d046314bae224c5b87399e (patch) | |
tree | 950c2c0533d4425b6572cfa9de84c40c44956b12 /src/Wallabag/UserBundle/DependencyInjection | |
parent | c997cfcc9c161241a6398b0942a1a869688d807a (diff) | |
parent | ab64c3d9ac591d30447428bd357b5b8c3a9bbcd7 (diff) | |
download | wallabag-e6a228c43bf98f64d2d046314bae224c5b87399e.tar.gz wallabag-e6a228c43bf98f64d2d046314bae224c5b87399e.tar.zst wallabag-e6a228c43bf98f64d2d046314bae224c5b87399e.zip |
Merge pull request #1544 from wallabag/2fa-email
v2 – Add custom email for 2FA
Diffstat (limited to 'src/Wallabag/UserBundle/DependencyInjection')
-rw-r--r-- | src/Wallabag/UserBundle/DependencyInjection/Configuration.php | 17 | ||||
-rw-r--r-- | src/Wallabag/UserBundle/DependencyInjection/WallabagUserExtension.php | 25 |
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 | |||
3 | namespace Wallabag\UserBundle\DependencyInjection; | ||
4 | |||
5 | use Symfony\Component\Config\Definition\Builder\TreeBuilder; | ||
6 | use Symfony\Component\Config\Definition\ConfigurationInterface; | ||
7 | |||
8 | class 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 | |||
3 | namespace Wallabag\UserBundle\DependencyInjection; | ||
4 | |||
5 | use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
6 | use Symfony\Component\Config\FileLocator; | ||
7 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
8 | use Symfony\Component\DependencyInjection\Loader; | ||
9 | |||
10 | class 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 | } | ||