mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
add default options
This commit is contained in:
@@ -201,14 +201,20 @@ class Twig
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$options = array();
|
$options = array(
|
||||||
|
'cache' => $registry->get('GV_RootPath') . 'tmp/cache_twig',
|
||||||
|
'debug' => false,
|
||||||
|
'strict_variables' => false,
|
||||||
|
'trim_blocks' => true,
|
||||||
|
'charset' => 'utf-8'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$confApp = new Core\Configuration\Application();
|
$confApp = new Core\Configuration\Application();
|
||||||
$confParser = new Core\Configuration\Parser\Yaml();
|
$confParser = new Core\Configuration\Parser\Yaml();
|
||||||
$handler = new Core\Configuration\Handler($confApp, $confParser);
|
$handler = new Core\Configuration\Handler($confApp, $confParser);
|
||||||
$configuration = new Core\Configuration($handler);
|
$configuration = new Core\Configuration($handler);
|
||||||
|
|
||||||
if ($configuration->isDebug())
|
if ($configuration->isDebug())
|
||||||
{
|
{
|
||||||
$options["debug"] = true;
|
$options["debug"] = true;
|
||||||
@@ -217,6 +223,7 @@ class Twig
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$options["debug"] = false;
|
$options["debug"] = false;
|
||||||
|
$options["cache"] = $registry->get('GV_RootPath') . 'tmp/cache_twig';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user