當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CPortlet類代碼示例

本文整理匯總了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();
 }
開發者ID:lanzelotik,項目名稱:celestic-community,代碼行數:10,代碼來源:IssuesByStatus.php

示例2: init

 public function init()
 {
     if ($this->title === NULL) {
         $this->title = Yum::t('Login');
     }
     parent::init();
 }
開發者ID:kumarsivarajan,項目名稱:yii-user-management,代碼行數:7,代碼來源:LoginWidget.php

示例3: init

 public function init()
 {
     if (!$this->dialogMode) {
         $this->title = Yii::t('CalModule.fullCal', 'Events list');
     }
     parent::init();
 }
開發者ID:SoftScape,項目名稱:open-school-CE,代碼行數:7,代碼來源:EventHelper.php

示例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();
 }
開發者ID:buildshop,項目名稱:bs-common,代碼行數:7,代碼來源:NewsRandom.php

示例5: init

 public function init()
 {
     $this->title = Yii::t('portlet', 'MyProjectsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
開發者ID:lanzelotik,項目名稱:celestic-community,代碼行數:7,代碼來源:MyProjects.php

示例6: init

 /**
  * Class object initialization
  */
 public function init()
 {
     $this->title = Yii::t('comments', 'CommentsTitle');
     $this->decorationCssClass = "portlet-header";
     $this->titleCssClass = "portlet-title";
     parent::init();
 }
開發者ID:lanzelotik,項目名稱:celestic-community,代碼行數:10,代碼來源:ListComments.php

示例7: run

 public function run()
 {
     if (!$this->renderDirect) {
         parent::run();
     } else {
         $this->renderContent();
     }
 }
開發者ID:wpp8909,項目名稱:findzhibo,代碼行數:8,代碼來源:CPortletExt.php

示例8: run

 public function run()
 {
     if (!Shop::getCartContent()) {
         return false;
     }
     $this->render('shopping_cart', array('products' => Shop::getCartContent()));
     return parent::run();
 }
開發者ID:rinodung,項目名稱:yii-shop,代碼行數:8,代碼來源:ShoppingCartWidget.php

示例9: init

 public function init()
 {
     if (Yum::module('message')->messageSystem === false) {
         return false;
     }
     $this->title = Yum::t('New messages');
     parent::init();
 }
開發者ID:kumarsivarajan,項目名稱:yii-user-management,代碼行數:8,代碼來源:MessageWidget.php

示例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();
 }
開發者ID:nguyendvphp,項目名稱:zicza,代碼行數:8,代碼來源:ListHotNewsWidget.php

示例11: init

 public function init()
 {
     $this->hideOnEmpty = true;
     $controllerId = Yii::app()->controller;
     if (method_exists($controllerId, 'getSubMenu')) {
         $this->menu = $controllerId->getSubMenu();
     }
     parent::init();
 }
開發者ID:kuzmina-mariya,項目名稱:gallery,代碼行數:9,代碼來源:Submenu.php

示例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();
 }
開發者ID:kvvn,項目名稱:homeforpets,代碼行數:9,代碼來源:SearchboxWidget.php

示例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()));
 }
開發者ID:kumarsivarajan,項目名稱:yii-user-management,代碼行數:9,代碼來源:ProfileCommentsWidget.php

示例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();
 }
開發者ID:josemanuel3dx,項目名稱:SEMMIO,代碼行數:14,代碼來源:EPoll.php

示例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));
 }
開發者ID:Canyian,項目名稱:yii-user-management-facebook,代碼行數:11,代碼來源:ProfileVisitWidget.php


注:本文中的CPortlet類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。