Skip to content

Commit

Permalink
Dev: renamed redata to aData
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Apr 18, 2017
1 parent c1c9934 commit 1ad4032
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions application/core/LSETwigViewRenderer.php
Expand Up @@ -152,15 +152,15 @@ public function setForcedPath($sPath)
* Render a string, not a file. It's used from template replace function.
*
* @param string $line The line of HTML/Twig to render
* @param array $redata Array containing the datas needed to render the view ($thissurvey)
* @param array $aDatas Array containing the datas needed to render the view ($thissurvey)
* @param boolean $bReturn Should the function echo the result, or just returns it?
*/
public function renderTemplateFromString( $line, $redata, $bReturn)
public function renderTemplateFromString( $line, $aDatas, $bReturn)
{
// If no redata, there is no need to use twig, so we just return the line.
// This happen when calling templatereplace() from admin, to replace some keywords.
// NOTE: this check is already done in templatereplace().
if (is_array($redata)){
if (is_array($aDatas)){
$this->_twig = $twig = parent::getTwig();

// At this point, forced path should not be nulled.
Expand All @@ -172,7 +172,7 @@ public function renderTemplateFromString( $line, $redata, $bReturn)

// Twig rendering
$oTwigTemplate = $twig->createTemplate($line);
$nvLine = $oTwigTemplate->render($redata, false);
$nvLine = $oTwigTemplate->render($aDatas, false);
}else{
$nvLine = $line;
}
Expand Down

0 comments on commit 1ad4032

Please sign in to comment.