mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°7315 - Migrate usages of WebPage::add_linked_xxx() for LoginTwigRenderer class
This commit is contained in:
@@ -52,12 +52,13 @@ class LoginTwigContext
|
||||
/**
|
||||
* Set the absolute path on disk of the folder containing the twig templates
|
||||
*
|
||||
* @param string $sPath absolute path of twig templates directory
|
||||
* @api
|
||||
*
|
||||
*@param string $sAbsPath Absolute path of twig templates directory
|
||||
*/
|
||||
public function SetLoaderPath($sPath)
|
||||
public function SetLoaderPath($sAbsPath)
|
||||
{
|
||||
$this->sTwigLoaderPath = $sPath;
|
||||
$this->sTwigLoaderPath = $sAbsPath;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,24 +85,27 @@ class LoginTwigContext
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the URL of a CSS file to link to the login screen
|
||||
* Add the absolute URL of a CSS file to link to the login screen
|
||||
*
|
||||
* @param string $sFile URL of the CSS file to link
|
||||
* @api
|
||||
*
|
||||
* @param string $sFileAbsURL Absolute URL of the CSS file to link
|
||||
*/
|
||||
public function AddCSSFile($sFile)
|
||||
public function AddCSSFile($sFileAbsURL)
|
||||
{
|
||||
$this->aCSSFiles[] = $sFile;
|
||||
$this->aCSSFiles[] = $sFileAbsURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the URL of a javascript file to link to the login screen
|
||||
* @param string $sFile URL of the javascript file to link
|
||||
* Add the absolute URL of a javascript file to link to the login screen
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $sFileAbsURL Absolute URL of the javascript file to link
|
||||
*/
|
||||
public function AddJsFile($sFile)
|
||||
public function AddJsFile($sFileAbsURL)
|
||||
{
|
||||
$this->aJsFiles[] = $sFile;
|
||||
$this->aJsFiles[] = $sFileAbsURL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +137,7 @@ class LoginTwigContext
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return array Absolute URLs of the CSS files
|
||||
*/
|
||||
public function GetCSSFiles()
|
||||
{
|
||||
@@ -141,7 +145,7 @@ class LoginTwigContext
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return array Absolute URLs of the JS files
|
||||
*/
|
||||
public function GetJsFiles()
|
||||
{
|
||||
@@ -274,12 +278,12 @@ class LoginTwigRenderer
|
||||
$aCSSFiles = $oFormData->GetCSSFiles();
|
||||
foreach ($aCSSFiles as $sCSSFile)
|
||||
{
|
||||
$oPage->add_linked_stylesheet($sCSSFile);
|
||||
$oPage->LinkStylesheetFromURI($sCSSFile);
|
||||
}
|
||||
$aJsFiles = $oFormData->GetJsFiles();
|
||||
foreach ($aJsFiles as $sJsFile)
|
||||
{
|
||||
$oPage->add_linked_script($sJsFile);
|
||||
$oPage->LinkScriptFromURI($sJsFile);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user