15
15
use Symfony \Component \Config \Definition \Exception \InvalidConfigurationException ;
16
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
17
17
use Symfony \Component \DependencyInjection \Loader \XmlFileLoader ;
18
- use Symfony \Component \DependencyInjection \Reference ;
19
18
use Symfony \Component \HttpKernel \DependencyInjection \Extension ;
20
19
use Symfony \Cmf \Bundle \RoutingBundle \Routing \DynamicRouter ;
21
20
@@ -33,7 +32,7 @@ public function load(array $configs, ContainerBuilder $container)
33
32
34
33
$ loader ->load ('menu.xml ' );
35
34
$ container ->setAlias ('cmf_menu.content_router ' , $ config ['content_url_generator ' ]);
36
- $ container ->setParameter ($ this ->getAlias () . '.allow_empty_items ' , $ config ['allow_empty_items ' ]);
35
+ $ container ->setParameter ($ this ->getAlias (). '.allow_empty_items ' , $ config ['allow_empty_items ' ]);
37
36
38
37
$ this ->loadVoters ($ config , $ loader , $ container );
39
38
@@ -56,14 +55,14 @@ public function loadVoters($config, XmlFileLoader $loader, ContainerBuilder $con
56
55
57
56
if (isset ($ config ['voters ' ]['content_identity ' ])) {
58
57
if (empty ($ config ['voters ' ]['content_identity ' ]['content_key ' ])) {
59
- if (! class_exists ('Symfony \\Cmf \\Bundle \\RoutingBundle \\Routing \\DynamicRouter ' )) {
58
+ if (!class_exists ('Symfony \\Cmf \\Bundle \\RoutingBundle \\Routing \\DynamicRouter ' )) {
60
59
throw new \RuntimeException ('You need to set the content_key when not using the CmfRoutingBundle DynamicRouter ' );
61
60
}
62
61
$ contentKey = DynamicRouter::CONTENT_KEY ;
63
62
} else {
64
63
$ contentKey = $ config ['voters ' ]['content_identity ' ]['content_key ' ];
65
64
}
66
- $ container ->setParameter ($ this ->getAlias () . '.content_key ' , $ contentKey );
65
+ $ container ->setParameter ($ this ->getAlias (). '.content_key ' , $ contentKey );
67
66
} else {
68
67
$ container ->removeDefinition ('cmf_menu.current_item_voter.content_identity ' );
69
68
}
@@ -89,7 +88,7 @@ public function loadPhpcr($config, XmlFileLoader $loader, ContainerBuilder $cont
89
88
90
89
foreach ($ keys as $ sourceKey => $ targetKey ) {
91
90
$ container ->setParameter (
92
- $ this ->getAlias () . '.persistence.phpcr. ' . $ targetKey ,
91
+ $ this ->getAlias (). '.persistence.phpcr. ' .$ targetKey ,
93
92
$ config [$ sourceKey ]
94
93
);
95
94
}
@@ -112,7 +111,7 @@ public function loadSonataAdmin($config, XmlFileLoader $loader, ContainerBuilder
112
111
foreach (array ('menu ' , 'node ' ) as $ key ) {
113
112
if (isset ($ config [$ key .'_admin_class ' ])) {
114
113
$ container ->setParameter (
115
- $ this ->getAlias () . '.persistence.phpcr. ' .$ key .'_admin.class ' ,
114
+ $ this ->getAlias (). '.persistence.phpcr. ' .$ key .'_admin.class ' ,
116
115
$ config [$ key .'_admin_class ' ]
117
116
);
118
117
}
@@ -137,7 +136,7 @@ public function loadExtensions($config, XmlFileLoader $loader, ContainerBuilder
137
136
throw new InvalidConfigurationException ('To use advanced menu options, you need the burgov/key-value-form-bundle in your project. ' );
138
137
}
139
138
140
- $ container ->setParameter ($ this ->getAlias () . '.admin_extensions.menu_options.advanced ' , $ config ['admin_extensions ' ]['menu_options ' ]['advanced ' ]);
139
+ $ container ->setParameter ($ this ->getAlias (). '.admin_extensions.menu_options.advanced ' , $ config ['admin_extensions ' ]['menu_options ' ]['advanced ' ]);
141
140
142
141
$ loader ->load ('admin-extension.xml ' );
143
142
}
0 commit comments