File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace FluffyFactory \Bundle \UserStatsBundle \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 ('fluffy_user_stats ' );
13
+
14
+ $ treeBuilder ->getRootNode ()
15
+ ->children ()
16
+ ->arrayNode ('exclude_route ' )->end ()
17
+ ->end ()
18
+ ;
19
+
20
+ return $ treeBuilder ;
21
+ }
22
+ }
Original file line number Diff line number Diff line change @@ -11,6 +11,11 @@ class UserStatsExtension extends Extension
11
11
{
12
12
public function load (array $ configs , ContainerBuilder $ container )
13
13
{
14
+ $ configuration = new Configuration ();
15
+ $ config = $ this ->processConfiguration ($ configuration , $ configs );
16
+
17
+ $ container ->setParameter ('fluffy_user_stats ' , $ config );
18
+
14
19
$ loader = new YamlFileLoader ($ container , new FileLocator (__DIR__ . '/../Resources/config ' ));
15
20
$ loader ->load ('services.yaml ' );
16
21
}
You can’t perform that action at this time.
0 commit comments