Skip to content

Commit

Permalink
Dev: added $requiredView for core views in qanda_helper::doRender()
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Dec 14, 2016
1 parent 076ffbd commit e225a8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/helpers/qanda_helper.php
Expand Up @@ -6555,6 +6555,7 @@ function getLabelInputWidth($labelAttributeWidth,$inputAttributeWidth){
function doRender($sView, $aData, $bReturn=true)
{
global $thissurvey;
$requiredView = Yii::getPathOfAlias('application.views').$sView;
if(isset($thissurvey['template']))
{
$sTemplate = $thissurvey['template'];
Expand All @@ -6570,7 +6571,7 @@ function doRender($sView, $aData, $bReturn=true)
}
}

// Twig or not twig?
// Twig or not twig?
if( file_exists($requiredView.'.twig') ){
return Yii::app()->twigRenderer->renderFile( Yii::app()->getController(), $requiredView.'.twig', $aData, $bReturn);
}else{
Expand Down

2 comments on commit e225a8f

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tell me when i can create PublicController with PublicController->renderPartial() replacement.

@LouisGac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say after I did the same work for PSPL file. So tonight.

Please sign in to comment.