本文整理汇总了PHP中CPortlet类的典型用法代码示例。如果您正苦于以下问题:PHP CPortlet类的具体用法?PHP CPortlet怎么用?PHP CPortlet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CPortlet类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: init
/**
* Initializes the portlet.
*/
public function init()
{
// Set the poll module (also kicks in the CSS via the module init)
$this->_module = Yii::app()->getModule('poll');
$this->attachBehavior('pollBehavior', 'poll.behaviors.PollBehavior');
$this->_poll = $this->poll_id == 0 ? Poll::model()->with('choices', 'votes', 'totalVotes')->latest()->find() : Poll::model()->with('choices', 'votes', 'totalVotes')->findByPk($this->poll_id);
if ($this->_poll) {
$this->title = $this->_poll->title;
}
parent::init();
}
开发者ID:phamvanvung1993,项目名称:yii-poll,代码行数:14,代码来源:EPoll.php
示例17: init
public function init()
{
$this->htmlOptions['class'] = 'dashboard-portlet';
$this->decorationCssClass = 'dashboard-portlet-header';
$this->titleCssClass = 'dashboard-portlet-title';
$this->contentCssClass = 'dashboard-portlet-content';
$this->title = $this->getTitle();
$this->id = $this->getClassName();
if (!$this->visible) {
$this->htmlOptions['class'] .= ' dashboard-portlet-invisible';
}
parent::init();
}
开发者ID:sharmarakesh,项目名称:edusec-college-management-system,代码行数:13,代码来源:DPortlet.php
示例18: init
public function init()
{
$this->hideOnEmpty = true;
$controllerId = Yii::app()->controller;
if (method_exists($controllerId, 'getMainMenu')) {
$this->menu = $controllerId->getMainMenu();
}
for ($i = 1; $i <= 3; $i++) {
$dataReader[] = array('label' => 'Example-' . $i, 'url' => array('#'));
}
$dataReader[] = array('label' => 'Home', 'url' => array('/site/index'));
$dataReader[] = array('label' => 'About', 'url' => array('/site/page', 'view' => 'about'));
$dataReader[] = array('label' => 'Contact', 'url' => array('/site/contact'));
foreach ($dataReader as $row) {
$this->menu[] = array('label' => $row['label'], 'url' => $row['url']);
}
parent::init();
}
开发者ID:antonfunk,项目名称:yiitask,代码行数:18,代码来源:MainMenu.php
示例19: init
/**
* Initializes the widget.
* This method will publish JUI assets if necessary.
* It will also register jquery and JUI JavaScript files and the theme CSS file.
* If you override this method, make sure you call the parent implementation first.
*/
public function init()
{
Yii::import('rbam.extensions.alphapager.ApPagination');
Yii::import('rbam.extensions.alphapager.ApArrayDataProvider');
$owner = $this->getOwner();
$this->id = $this->relationship;
$this->title = CHtml::tag('p', array(), $this->hint($this->relationship)) . $this->relationship($this->relationship);
$attribute = 'name';
foreach ($owner->types as $type) {
if ($this->relationship === 'parents' && $type < $this->item->type || $this->relationship === 'children' && $type > $this->item->type) {
continue;
}
$getter = 'getE' . ucfirst($this->relationship);
$alphaPagination = new ApPagination($attribute);
$data = array_values($this->item->{$getter}($type));
$alphaPagination->activeCharSet = $owner->activeChars($data, $attribute);
$this->_relations[$type] = new ApArrayDataProvider($data, array('keyField' => $attribute, 'alphapagination' => $alphaPagination, 'pagination' => array('pageSize' => is_null($owner->module->relationshipsPageSize) ? $owner->module->pageSize : $owner->module->relationshipsPageSize), 'sort' => array('attributes' => array('name', 'description'), 'defaultOrder' => array('name' => false, 'description' => false))));
}
parent::init();
}
开发者ID:jayrulez,项目名称:kcconline,代码行数:26,代码来源:RbamRelationship.php
示例20: run
public function run()
{
if ($this->products === true) {
$this->products = Products::model()->findAll('status = 1');
}
if (!is_array($this->products)) {
$this->products = array($products);
}
if (!$this->selected) {
$this->selected = $this->products[0]->product_id;
}
$products = array();
foreach ($this->products as $product) {
if (is_numeric($product)) {
$products[$product] = Products::model()->findByPk($product);
} else {
$products[$product->product_id] = $product;
}
}
$this->render($this->view, array('selected' => $this->selected, 'ask_for_amount' => $this->ask_for_amount, 'products' => $products));
return parent::run();
}
开发者ID:rinodung,项目名称:yii-shop,代码行数:22,代码来源:ImageUploadWidget.php
注:本文中的CPortlet类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论