Files
iTop/sources/application/TwigBase/Twig/TwigHelper.php
Eric 7f3efe59ab Refactor Core Update (+3 squashed commit)
Squashed commit:

[e1cbfe93f] Refactor Core Update

[41ec2adf7] Refactor Core Update

[ca6cefca3] Refactor Core Update
2020-01-07 10:00:13 +01:00

24 lines
468 B
PHP

<?php
/**
* @copyright Copyright (C) 2010-2019 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
namespace Combodo\iTop\Application\TwigBase\Twig;
use Twig_Environment;
use Twig_Loader_Filesystem;
class TwigHelper
{
public static function GetTwigEnvironment($sViewPath)
{
$oLoader = new Twig_Loader_Filesystem($sViewPath);
$oTwig = new Twig_Environment($oLoader);
Extension::RegisterTwigExtensions($oTwig);
return $oTwig;
}
}