mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 20:48:46 +02:00
Refactor Core Update (+3 squashed commit)
Squashed commit: [e1cbfe93f] Refactor Core Update [41ec2adf7] Refactor Core Update [ca6cefca3] Refactor Core Update
This commit is contained in:
23
sources/application/TwigBase/Twig/TwigHelper.php
Normal file
23
sources/application/TwigBase/Twig/TwigHelper.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user