Skip to content

Commit 1219a4d

Browse files
committed
set the RoutingBundle generic_controller if ContentBundle is available
1 parent c54bcf2 commit 1219a4d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

DependencyInjection/CmfCoreExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class CmfCoreExtension extends Extension implements PrependExtensionInterface
2020
*/
2121
public function prepend(ContainerBuilder $container)
2222
{
23+
$bundles = $container->getParameter('kernel.bundles');
24+
2325
// process the configuration of SymfonyCmfCoreExtension
2426
$configs = $container->getExtensionConfig($this->getAlias());
2527
$parameterBag = $container->getParameterBag();
@@ -122,6 +124,10 @@ public function prepend(ContainerBuilder $container)
122124
)
123125
)
124126
);
127+
128+
if (isset($bundles['CmfContentBundle'])) {
129+
$prependConfig['dynamic']['generic_controller'] = 'cmf_content.controller:indexAction';
130+
}
125131
break;
126132
/*
127133
case 'cmf_simple_cms':

0 commit comments

Comments
 (0)