private function displayContent($aData = false, $views = false) { // TODO : improve and move to PluginsController if (!$aData) { $aData = array(); } $aData['surveyid'] = $aData['iSurveyID'] = $aData['iSurveyId'] = $this->iSurveyId; $aData['bSurveyActivated'] = $this->bSurveyActivated; $oAdminController = new AdminController('admin'); $oCommonAction = new Survey_Common_Action($oAdminController, 'survey'); $aData['sImageURL'] = Yii::app()->getConfig('adminimageurl'); $aData['aResult'] = $this->aResult; /* Mimic 2.06 system : must fix */ ob_start(); header("Content-type: text/html; charset=UTF-8"); // needed for correct UTF-8 encoding $assetUrl = Yii::app()->assetManager->publish(dirname(__FILE__) . '/assets'); Yii::app()->clientScript->registerScriptFile($assetUrl . '/kcedelphi.js', CClientScript::POS_END); Yii::app()->clientScript->registerCssFile($assetUrl . '/kcedelphi.css'); Yii::app()->clientScript->registerCssFile($assetUrl . '/settingsfix.css'); $oAdminController->_getAdminHeader(); $oAdminController->_showadminmenu($this->iSurveyId); if ($this->iSurveyId) { $oCommonAction->_surveybar($this->iSurveyId); } foreach ($views as $view) { Yii::setPathOfAlias("views.{$view}", dirname(__FILE__) . DIRECTORY_SEPARATOR . "views" . DIRECTORY_SEPARATOR . $view); $oAdminController->renderPartial("views.{$view}", $aData); } $oAdminController->_loadEndScripts(); $oAdminController->_getAdminFooter('http://manual.limesurvey.org', gT('LimeSurvey online manual')); $sOutput = ob_get_contents(); ob_clean(); App()->getClientScript()->render($sOutput); echo $sOutput; Yii::app()->end(); }