Feature/merge 3 0 develop (#298)

* merging 3.0 into develop

* N°5102 - Allow to send emails (eg. notifications) using GSuite SMTP and OAuth
* migration to iTop 3.1

Co-authored-by: Eric Espie <eric.espie@combodo.com>
This commit is contained in:
bdalsass
2022-06-08 16:27:20 +02:00
committed by GitHub
parent 1fd792fed9
commit 2b885beb82
347 changed files with 53400 additions and 3034 deletions

View File

@@ -85,7 +85,7 @@ abstract class Controller
* @param string $sViewPath Path of the twig files
* @param string $sModuleName name of the module (or 'core' if not a module)
*/
public function __construct($sViewPath, $sModuleName = 'core')
public function __construct($sViewPath, $sModuleName = 'core', $aAdditionalPaths = [])
{
$this->m_aLinkedScripts = [];
$this->m_aLinkedStylesheets = [];
@@ -93,7 +93,7 @@ abstract class Controller
$this->m_aAjaxTabs = [];
$this->m_aDefaultParams = [];
$this->m_aBlockParams = [];
$this->SetViewPath($sViewPath);
$this->SetViewPath($sViewPath, $aAdditionalPaths);
$this->SetModuleName($sModuleName);
if ($sModuleName != 'core') {
try {
@@ -128,9 +128,9 @@ abstract class Controller
*
* @param string $sViewPath
*/
public function SetViewPath($sViewPath)
public function SetViewPath($sViewPath, $aAdditionalPaths = [])
{
$oTwig = TwigHelper::GetTwigEnvironment($sViewPath);
$oTwig = TwigHelper::GetTwigEnvironment($sViewPath, $aAdditionalPaths);
$this->m_oTwig = $oTwig;
}