File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -20,29 +20,20 @@ class CmfCoreExtension extends Extension implements PrependExtensionInterface
20
20
*/
21
21
public function prepend (ContainerBuilder $ container )
22
22
{
23
- $ bundles = $ container ->getParameter ('kernel.bundles ' );
24
-
25
23
// process the configuration of SymfonyCmfCoreExtension
26
24
$ configs = $ container ->getExtensionConfig ($ this ->getAlias ());
27
25
$ parameterBag = $ container ->getParameterBag ();
28
26
$ configs = $ parameterBag ->resolveValue ($ configs );
29
27
$ config = $ this ->processConfiguration (new Configuration (), $ configs );
30
- if (isset ($ config ['multilang ' ]['locales ' ])) {
28
+
29
+ $ extensions = $ container ->getExtensions ();
30
+ if (isset ($ config ['multilang ' ]['locales ' ]) && isset ($ extensions ['cmf_routing ' ])) {
31
31
$ prependConfig = array ('multilang ' => $ config ['multilang ' ]);
32
- foreach ($ container ->getExtensions () as $ name => $ extension ) {
33
- switch ($ name ) {
34
- case 'cmf_routing ' :
35
- $ container ->prependExtensionConfig ($ name , array ('dynamic ' => $ prependConfig ['multilang ' ]));
36
- break ;
37
- }
38
- }
32
+ $ container ->prependExtensionConfig ('cmf_routing ' , array ('dynamic ' => $ prependConfig ['multilang ' ]));
39
33
}
40
34
41
35
if (isset ($ config ['persistence ' ]['phpcr ' ])) {
42
36
$ bundles = $ container ->getParameter ('kernel.bundles ' );
43
- if (!isset ($ bundles ['SonataDoctrinePHPCRAdminBundle ' ])) {
44
- $ config ['persistence ' ]['phpcr ' ]['use_sonata_admin ' ] = false ;
45
- }
46
37
$ persistenceConfig = $ config ['persistence ' ]['phpcr ' ];
47
38
48
39
foreach ($ container ->getExtensions () as $ name => $ extension ) {
You can’t perform that action at this time.
0 commit comments