Skip to content

Commit

Permalink
Dev: removed questionIndexHelper::getIndexHtml()
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed May 10, 2017
1 parent 5ec8f4f commit b39cf64
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions application/helpers/questionIndexHelper.php
Expand Up @@ -81,6 +81,7 @@ public static function getInstance()

return self::$instance;
}

/**
* Get the array of all step for this session
*
Expand Down Expand Up @@ -237,41 +238,4 @@ private function getIndexItemsQuestions($type)
return $stepIndex;
}


/**
* Return html with params
* @param string : $surveyFormat (G|S)
* @param string : $viewType (link|button)
*
* @return string : html to be used
*/
private function getIndexHtml($surveyFormat,$viewType='button')
{
switch($surveyFormat){
case 'G':
$viewFile="groupIndex";
break;
case 'S':
$viewFile="questionIndex";
break;
default:
Yii::log("Uknow survey format for question index, must be G or S.", 'error','application.helpers.questionIndexHelper');
return "";
}
switch($viewType){
case 'button':
break;
case 'link':
$viewFile.="MenuLink";
break;
default:
Yii::log("Uknow view type for question index, must be button or link.", 'error','application.helpers.questionIndexHelper');
return "";
}
Yii::import('application.helpers.viewHelper', true);
return Yii::app()->getController()->renderPartial("/survey/system/surveyIndex/{$viewFile}",array(
'type'=>$this->indexType,
'indexItems'=>$this->indexItems,
),true);
}
}

0 comments on commit b39cf64

Please sign in to comment.