IndexAction.php 553 Bytes
Newer Older
Clément Damiens's avatar
 
Clément Damiens committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 <?php
class IndexAction extends CAction
{
    public function run($id=null, $answer=null, $tpl=null)
    {
    	$this->getController()->layout = "//layouts/empty";
		$params = ["canEdit" => true];
      //  if( isset($test) ){
        //    $params["tpl"]=$id;
        //}
        if(!empty($id)){
            $params["answerId"]=$id;
        }
        $params = Form::getDataForAnswer($params);
        $tpl=(!empty($tpl)) ? $tpl : "survey.views.tpls.forms.formWizard";
        echo $this->getController()->renderPartial($tpl,$params );
	 			
    }
 }