mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-28 04:58:46 +02:00
Squashed commit: [e1cbfe93f] Refactor Core Update [41ec2adf7] Refactor Core Update [ca6cefca3] Refactor Core Update
24 lines
468 B
PHP
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;
|
|
}
|
|
}
|