本文整理汇总了PHP中CPortlet::run方法的典型用法代码示例。如果您正苦于以下问题:PHP CPortlet::run方法的具体用法?PHP CPortlet::run怎么用?PHP CPortlet::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPortlet
的用法示例。
在下文中一共展示了CPortlet::run方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
public function run()
{
if (!$this->renderDirect) {
parent::run();
} else {
$this->renderContent();
}
}
示例2: run
public function run()
{
if (!Shop::getCartContent()) {
return false;
}
$this->render('shopping_cart', array('products' => Shop::getCartContent()));
return parent::run();
}
示例3: 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();
}
示例4: 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();
}
示例5: run
public function run()
{
// устанавливаем условие для отбора
$criteria = new CDbCriteria();
$criteria->select = 't.title,t.photo,t.price,t.link, t.article, t.state';
$criteria->compare('on_main', true);
$criteria->with = array('idCategoryFast');
/*$dataProvider = new CActiveDataProvider('CatalogProduct', array(
'criteria'=>$criteria,
'sort' => array(
'defaultOrder' => 'sort_order ASC',
),
'pagination'=>false,
));*/
$products = CatalogProduct::model()->findAll($criteria);
// Тасуем продукты
if (is_array($products)) {
shuffle($products);
}
$this->render('prodtomain', array('products' => $products));
return parent::run();
}
示例6: 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();
}
示例7: run
public function run()
{
$this->render('adminmenu');
return parent::run();
}
示例8: run
public function run()
{
parent::run();
?>
<<?php
echo $this->mediaType;
?>
id="player2" src="<?php
echo $this->url;
?>
"
type="<?php
echo $this->mimeType;
?>
" controls="controls" autoplay="<?php
echo $this->autoplay;
?>
">
</<?php
echo $this->mediaType;
?>
>
<script>
$('audio,video').mediaelementplayer();
</script>
<?php
}
示例9: run
public function run()
{
parent::run();
$tagContent = $this->tagContentGenerator();
echo CHtml::tag($this->mediaType, $this->htmlOptions, $tagContent);
?>
<script>var player = new MediaElementPlayer('audio,video');</script>
<?php
}
示例10: run
/**
* Running
*
* @throws CException
*/
public function run()
{
$this->render('gallery');
return parent::run();
}
示例11: run
public function run()
{
parent::run();
?>
<<?php
echo $this->mediaType;
?>
id="player2" src="<?php
echo $this->url;
?>
"
type="<?php
echo $this->mimeType;
?>
" height="<?php
echo $this->height;
?>
" controls="controls" <?php
echo $this->autoplay;
?>
>
<script>
//$('video').mediaelementplayer();
</script>
<?php
}
示例12: run
public function run()
{
$this->widget('YumMenu', array('items' => $this->getMenuItems()));
parent::run();
}
示例13: run
/**
* Run
*
* @return mixed
*/
public function run()
{
$this->render('servicesAdminMenu');
return parent::run();
}
示例14: run
public function run()
{
parent::run();
if ($this->onlyPublishAssets) {
return;
}
$tagContent = $this->tagContentGenerator();
echo CHtml::tag($this->mediaType, $this->htmlOptions, $tagContent);
$js = <<<JS
var player = new MediaElementPlayer('audio,video');
JS;
Yii::app()->clientScript->registerScript('mediaelement', $js);
}