Skip to content

Commit 984c359

Browse files
committed
simplified code
1 parent 788a55b commit 984c359

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

DependencyInjection/CmfRoutingExtension.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function load(array $configs, ContainerBuilder $container)
2828

2929
$config = $processor->processConfiguration($configuration, $configs);
3030

31-
if (!empty($config['dynamic'])) {
31+
if (!empty($config['dynamic']['enabled'])) {
3232
// load this even if no explicit enabled value but some configuration
3333
$this->setupDynamicRouter($config['dynamic'], $container, $loader);
3434
}
@@ -68,10 +68,6 @@ public function setupFormTypes(array $config, ContainerBuilder $container, Loade
6868
*/
6969
private function setupDynamicRouter(array $config, ContainerBuilder $container, LoaderInterface $loader)
7070
{
71-
if (isset($config['enabled']) && false == $config['enabled']) {
72-
// prevent wtf if somebody is playing around with configs
73-
return;
74-
}
7571
$container->setParameter($this->getAlias() . '.generic_controller', $config['generic_controller']);
7672
$container->setParameter($this->getAlias() . '.controllers_by_type', $config['controllers_by_type']);
7773
$container->setParameter($this->getAlias() . '.controllers_by_class', $config['controllers_by_class']);

0 commit comments

Comments
 (0)