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
2020 */
2121 public function prepend (ContainerBuilder $ container )
2222 {
23- $ bundles = $ container ->getParameter ('kernel.bundles ' );
24-
2523 // process the configuration of SymfonyCmfCoreExtension
2624 $ configs = $ container ->getExtensionConfig ($ this ->getAlias ());
2725 $ parameterBag = $ container ->getParameterBag ();
2826 $ configs = $ parameterBag ->resolveValue ($ configs );
2927 $ 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 ' ])) {
3131 $ 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 ' ]));
3933 }
4034
4135 if (isset ($ config ['persistence ' ]['phpcr ' ])) {
4236 $ bundles = $ container ->getParameter ('kernel.bundles ' );
43- if (!isset ($ bundles ['SonataDoctrinePHPCRAdminBundle ' ])) {
44- $ config ['persistence ' ]['phpcr ' ]['use_sonata_admin ' ] = false ;
45- }
4637 $ persistenceConfig = $ config ['persistence ' ]['phpcr ' ];
4738
4839 foreach ($ container ->getExtensions () as $ name => $ extension ) {
You can’t perform that action at this time.
0 commit comments