N°3169 - Add feature to connect Gsuite mail box with OAuth

N°2504 - Add feature to connect Office mail box with OAuth2 for Microsoft Graph
N°5102 - Allow to send emails (eg. notifications) using GSuite SMTP and OAuth
 * 2.7 migration
This commit is contained in:
Eric Espie
2022-05-16 14:51:12 +02:00
parent 644e1ac4f6
commit eb1d56f439
17 changed files with 309 additions and 669 deletions

View File

@@ -17,9 +17,13 @@ use WebPage;
class TwigHelper
{
public static function GetTwigEnvironment($sViewPath)
public static function GetTwigEnvironment($sViewPath, $aAdditionalPaths = [])
{
$oLoader = new Twig_Loader_Filesystem($sViewPath);
foreach ($aAdditionalPaths as $sAdditionalPath) {
$oLoader->addPath($sAdditionalPath);
}
$oTwig = new Twig_Environment($oLoader);
Extension::RegisterTwigExtensions($oTwig);
$sLocalPath = utils::LocalPath($sViewPath);