本文整理匯總了PHP中CController::renderText方法的典型用法代碼示例。如果您正苦於以下問題:PHP CController::renderText方法的具體用法?PHP CController::renderText怎麽用?PHP CController::renderText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CController
的用法示例。
在下文中一共展示了CController::renderText方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: renderText
public function renderText($text, $return = false)
{
if (Yii::app()->request->isAjaxRequest) {
$text = $this->processOutput($text);
if ($return) {
return $text;
} else {
echo $text;
}
} else {
return parent::renderText($text, $return);
}
}
示例2: __construct
/**
* Initializes the pager by setting some default property values.
* @param string $html
* @param string $title
* @param mixed $format
* @param string $orientation
*/
public function __construct($html, $title = '', $format = 'A4', $orientation = 'P')
{
parent::__construct($this->mode, $format, $this->defaultFontSize, $this->defaultFont, $this->marginLeft, $this->marginRight, $this->marginTop, $this->marginBottom, $this->marginHeader, $this->marginFooter, $orientation);
$controller = new CController('PDF');
$controller->layout = $this->layouts;
$html = $controller->renderText($html, true);
$this->SetCreator($this->creator);
$this->SetTitle($title);
if (!UserWeb::instance()->isGuest) {
$this->SetFooter(sprintf('Berkas dicetak oleh %s, %s||{PAGENO}', UserWeb::instance()->user()->username, date('Y-m-d H:i:s')));
} else {
throw new CHttpException(403, 'Anda tidak memiliki otoritas untuk mengakses halaman ini');
}
$this->writeHTML($html);
}