Commit 4acfd5f9 authored by dj3c1t's avatar dj3c1t

installManager: clearAppCache

parent d891b43f
......@@ -33,6 +33,7 @@ class InstallController extends Controller {
$im->setSiteTitle();
$im->createAdminUser();
$im->saveParameters();
$im->clearAppCache();
return $this->redirect($this->generateUrl('install_success'));
}
catch(\Exception $e) {
......
......@@ -119,6 +119,23 @@ class InstallManager {
}
}
public function clearAppCache() {
$kernel = $this->container->get('kernel');
$application = new Application($kernel);
$application->setAutoExit(false);
$resultCode = $application->run(
new ArrayInput(
array(
'command' => 'cache:clear',
)
),
new NullOutput()
);
if($resultCode != 0) {
throw new \Exception("Impossible de vider le cache");
}
}
public function setSiteTitle() {
$em = $this->container->get('doctrine')->getManager();
$configurationRepo = $em->getRepository("Dj3c1tAppBundle:Configuration");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment