本文整理汇总了PHP中CPortlet类的典型用法代码示例。如果您正苦于以下问题:PHP CPortlet类的具体用法?PHP CPortlet怎么用?PHP CPortlet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CPortlet类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Class object initialization
*/
public function init()
{
$this->title = CHtml::image(Yii::app()->request->baseUrl . '/images/portlets/charts.png') . " " . Yii::t('portlet', 'ProjectsProgressTitle');
$this->decorationCssClass = "portlet-header";
$this->titleCssClass = "portlet-title";
parent::init();
}
示例2: init
public function init()
{
if ($this->title === NULL) {
$this->title = Yum::t('Login');
}
parent::init();
}
示例3: init
public function init()
{
if (!$this->dialogMode) {
$this->title = Yii::t('CalModule.fullCal', 'Events list');
}
parent::init();
}
示例4: init
public function init()
{
$assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets');
$clientScript = Yii::app()->clientScript;
$clientScript->registerCssFile($assets . '/widget-widget.css');
parent::init();
}
示例5: init
public function init()
{
$this->title = Yii::t('portlet', 'MyProjectsTitle');
$this->decorationCssClass = "portlet-header";
$this->titleCssClass = "portlet-title";
parent::init();
}
示例6: init
/**
* Class object initialization
*/
public function init()
{
$this->title = Yii::t('comments', 'CommentsTitle');
$this->decorationCssClass = "portlet-header";
$this->titleCssClass = "portlet-title";
parent::init();
}
示例7: run
public function run()
{
if (!$this->renderDirect) {
parent::run();
} else {
$this->renderContent();
}
}
示例8: run
public function run()
{
if (!Shop::getCartContent()) {
return false;
}
$this->render('shopping_cart', array('products' => Shop::getCartContent()));
return parent::run();
}
示例9: init
public function init()
{
if (Yum::module('message')->messageSystem === false) {
return false;
}
$this->title = Yum::t('New messages');
parent::init();
}
示例10: run
public function run()
{
$dataProvider = new CActiveDataProvider('News', array('criteria' => array('condition' => "status = 1", 'order' => 'created_time DESC', 'limit' => '6')));
//var_dump($dataProvider);
//$dataProvider->pagination->pageSize=5;
$this->render(Yii::app()->params['web_path'] . 'views.wNews.hotnews', array('dataProvider' => $dataProvider));
return parent::run();
}
示例11: init
public function init()
{
$this->hideOnEmpty = true;
$controllerId = Yii::app()->controller;
if (method_exists($controllerId, 'getSubMenu')) {
$this->menu = $controllerId->getSubMenu();
}
parent::init();
}
示例12: run
public function run()
{
$params = CMap::mergeArray($this->defaultParams, $this->params);
$colorList = $sizeList = array();
$colorList = CHtml::listData(Yii::app()->db->createCommand("SELECT DISTINCT(`color`) FROM `catalog_product` WHERE `color` <> '' AND id_category = 1 AND (hide = 0 OR hide is NULL);")->queryAll(), 'color', 'color');
$sizeList = CHtml::listData(Yii::app()->db->createCommand("SELECT DISTINCT(`size`) FROM `catalog_product` WHERE `size` <> '' AND id_category = 2 AND (hide = 0 OR hide is NULL);")->queryAll(), 'size', 'size');
$this->render($this->view, array('params' => $params, 'colorList' => $colorList, 'sizeList' => $sizeList));
return parent::run();
}
示例13: renderContent
protected function renderContent()
{
parent::renderContent();
if (Yii::app()->user->isGuest) {
return false;
}
$user = YumUser::model()->findByPk(Yii::app()->user->id);
$this->render('profile_comments', array('comments' => Yii::app()->user->data()->profile->recentComments()));
}
示例14: init
/**
* Initializes the portlet.
*/
public function init()
{
$assets = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . '../assets');
$clientScript = Yii::app()->clientScript;
$clientScript->registerCssFile($assets . '/poll.css');
$this->_poll = $this->poll_id == 0 ? Poll::model()->latest()->find() : Poll::model()->findByPk($this->poll_id);
if ($this->_poll) {
$this->title = $this->_poll->title;
}
parent::init();
}
示例15: renderContent
protected function renderContent()
{
if (!Yum::module('profile')->enableProfileVisitLogging) {
return false;
}
parent::renderContent();
if (Yii::app()->user->isGuest) {
return false;
}
$this->render('profile_visits', array('visits' => Yii::app()->user->data()->visits));
}