protected function renderColumn($column) { foreach ($this->views[$column] as $view => $config) { $this->currentView =& $this->views[$column][$view]; $output = $this->controller->renderPartial($view, $this->data, true); $this->views[$column][$view]['content'] = $output; } }
public function renderMailContent(CController $controller) { if ($this->templatePath) { $controller->renderPartial($this->getMailTemplatePath(), $this->getParamsToRender()); } else { echo ''; } }
/** * 最终跳转处理 * @param type $msg 提示信息 * @param type $jumpurl 跳转url * @param type $wait 等待时间 * @param int $type 消息类型 0或1 */ private static function _jump($msg = "", $jumpurl = "", $wait = 3, $type = 0) { $data = array('msg' => $msg, 'jumpurl' => $jumpurl, 'wait' => $wait, 'type' => $type); $data['title'] = $type == 1 ? "提示信息" : "错误信息"; if (empty($jumpurl)) { if ($type == 1) { $data['jumpurl'] = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : "javascript:window.close();"; } else { $data['jumpurl'] = "javascript:history.back(-1);"; } } $cc = new CController('showmessage'); $cc->renderPartial("/showMessage", $data); exit; }
public static function handle(CExceptionEvent $event) { $exception = $event->exception; if (get_class($exception) == "CHttpException" && $exception->statusCode === 404) { $pathParts = explode('/', Yii::app()->getRequest()->getRequestUri()); $pathPart = array_pop($pathParts); $criteria = new CDbCriteria(); $criteria->addSearchCondition('alias', $pathPart); $criteria->limit = 5; $models = Article::model()->findAll($criteria); $controller = new CController(null); $controller->renderPartial('//error/404', array('models' => $models)); $event->handled = true; } }
/** * * @param string $view * @param array $data * @param boolean $return * @param boolean $processOutput */ public function render($view, $data = null, $return = false, $processOutput = true) { if (Yii::app()->request->isAjaxRequest === true) { parent::renderPartial($view, $data, $return, $processOutput); } else { parent::render($this->setEmView($view), $data, $return); } }
echo $this->render('editor/cpContext'); ?> <?php if ($this->levelAccess === 2) { ?> <div class="adminCpFb"><?php echo $this->tr('administrator'); ?> </div> <div id="showCPanel" class="rowFBCp showCPanelAdmin"><?php echo $this->tr('cPanel'); ?> </div> <?php CController::renderPartial('administrator/cpAdmin'); ?> <?php } ?> </div> <?php $this->endWidget(); ?> <?php $this->album || $this->collection ? $this->render('editor/removeAlbum') : $this->render(!$this->isShop ? 'editor/createAlbum' : 'editorShop/createAlbum'); ?>
public function getAsNode($formato = '', $prefix = '') { # Dependiendo el formato se regresa este objecto como un nodo $id = $this->PuntosventaId; switch ($formato) { case 'li': # Regresa como un elemento de lista $nombre = $this->PuntosventaNom; CController::renderPartial('_nodoCPVF', array('fid' => $prefix, 'pid' => $id, 'nombre' => $nombre, 'padre' => $this->getTieneHijos())); break; case 'ul': # Regresa como un elemento de lista return CHtml::openTag('ul', array('data-id' => $this->PuntosventaId)); return CHtml::tag('li', array('data-id' => $this->PuntosventaId), $this->PuntosventaNom); return CHtml::closeTag('ul'); break; case 'node': # Regresa como un arreglo en formato de nodo return array('id' => $this->PuntosventaId, 'nombre' => $this->PuntosventaNom, 'hijos' => array()); break; case 'accordion': # Devuelve el nodo como un elemento de acordion break; default: # Por default imprime un elemento de lista return CHtml::tag('li', array('data-id' => $this->PuntosventaId), $this->PuntosventaNom); break; } }
/** * renderPartial * * @param mixed $view * @param mixed $data * @param mixed $return * @param mixed $processOutput * @access public * @return void */ public function renderPartial($view, $data = NULL, $return = false, $processOutput = false) { Yii::log(Yii::app()->controller->id . "Controller/action" . Yii::app()->controller->action->id . " done, passing to view: {$view}", "trace", self::LOG_CAT); return parent::renderPartial($view, $data, $return, $processOutput); }
<div class="toggleSettings toggleDown"><?php echo Yii::t('app', 'Configure Gallery'); ?> </div> <?php CController::renderPartial('frmGallery', array('model' => $galleryConfig, 'field' => 'gallery')); ?> <div id="defFancybox" class="defaultCfg" title="<?php echo Yii::t('app', 'Load default configuration for Fancy Box'); ?> "></div> <div class="toggleSettings toggleDown"><?php echo Yii::t('app', 'Configure Fancy Box'); ?> </div> <?php CController::renderPartial('frmFancyBox', array('model' => $fancyBoxConfig, 'field' => 'fancybox')); ?> <div id="defUploader" class="defaultCfg" title="<?php echo Yii::t('app', 'Load default configuration for Uploader'); ?> "></div> <div class="toggleSettings toggleDown"><?php echo Yii::t('app', 'Configure Uploader'); ?> </div> <?php CController::renderPartial('frmUploader', array('model' => $uploaderConfig, 'field' => 'uploader'));
?> </h1> <h3><?php echo ModelPerson::model()->findByPK(Yii::app()->user->id_person)->email; ?> </h3> <br> <div class="info-user"> <a href="<?php echo Yii::app()->createUrl('user/account'); ?> "><span aria-hidden="true" class="li_user fs1"></span></a> <a href="#ChangePass" data-toggle="modal"><span aria-hidden="true" class="li_key fs1"></span></a> <?php $controller = new CController('user'); $controller->renderPartial('application.views.user._pass'); ?> </div> </div> </div> <?php } ?> <!-- RECIBOS UPLOADS --> <div class="col-sm-3 col-lg-3"> <div class="dash-unit"> <dtitle>Recibos Review</dtitle> <hr> <div class="cont"> <br> <p><bold>X</bold> | <ok>Approved</ok></p>