Skip to content

Commit f040644

Browse files
committed
Fix bug when not enabling sonata
1 parent 2320ed4 commit f040644

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DependencyInjection/CmfRoutingExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ private function loadPhpcrProvider($config, XmlFileLoader $loader, ContainerBuil
227227

228228
private function loadSonataPhpcrAdmin($config, XmlFileLoader $loader, ContainerBuilder $container)
229229
{
230-
$loader->load('admin-phpcr.xml');
231-
232230
$bundles = $container->getParameter('kernel.bundles');
233231
if ('auto' === $config['use_sonata_admin'] && !isset($bundles['SonataDoctrinePHPCRAdminBundle'])) {
234232
return;
235233
}
236234

235+
$loader->load('admin-phpcr.xml');
236+
237237
$basePath = $config['admin_basepath'] ?: reset($config['route_basepaths']);
238238
$container->setParameter('cmf_routing.dynamic.persistence.phpcr.admin_basepath', $basePath);
239239

0 commit comments

Comments
 (0)