Example #1
0
 public function run()
 {
     if (!$this->renderDirect) {
         parent::run();
     } else {
         $this->renderContent();
     }
 }
Example #2
0
 public function run()
 {
     if (!Shop::getCartContent()) {
         return false;
     }
     $this->render('shopping_cart', array('products' => Shop::getCartContent()));
     return parent::run();
 }
Example #3
0
 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();
 }
Example #4
0
 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();
 }
 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();
 }
Example #6
0
 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();
 }
Example #7
0
 public function run()
 {
     $this->render('adminmenu');
     return parent::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 
    }
    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 
    }
 public function run()
 {
     $this->render('application.modules.shop.views.category.index');
     return parent::run();
 }
Example #11
0
 /**
  * Running
  *
  * @throws CException
  */
 public function run()
 {
     $this->render('gallery');
     return parent::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 
    }
Example #13
0
 public function run()
 {
     $this->render('reviewsAdminMenu');
     return parent::run();
 }
 public function run()
 {
     $this->widget('YumMenu', array('items' => $this->getMenuItems()));
     parent::run();
 }
Example #15
0
 /**
  * Run
  *
  * @return mixed
  */
 public function run()
 {
     $this->render('servicesAdminMenu');
     return parent::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);
    }