Merge branch 'master' into dist/envole/6/master

This commit is contained in:
2021-03-03 16:39:00 +01:00
3 changed files with 42 additions and 0 deletions

View File

@ -237,6 +237,27 @@ class InitDataCommand extends ContainerAwareCommand
$this->addModeration($profil,'cadoles_cron_config_log',0);
}
// Forcer le theme
$force_theme=$this->getContainer()->getParameter('force_theme');
if($force_theme) {
// On force la configuration du theme
$force_themename=$this->getContainer()->getParameter('force_themename');
$config = $em->getRepository('CadolesCoreBundle:Config')->find("theme");
if($config) {
$config->setValue($force_themename);
$em->persist($config);
$em->flush();
}
// On enlève l'accès de la sidebar
$sidebar = $em->getRepository('CadolesCoreBundle:Sidebar')->findOneBy(["path"=>"cadoles_core_config_theme"]);
if($sidebar) {
$em->remove($sidebar);
$em->flush();
}
}
$output->writeln('');
}