当前位置: 首页>>代码示例>>PHP>>正文


PHP CWidget::run方法代码示例

本文整理汇总了PHP中CWidget::run方法的典型用法代码示例。如果您正苦于以下问题:PHP CWidget::run方法的具体用法?PHP CWidget::run怎么用?PHP CWidget::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CWidget的用法示例。


在下文中一共展示了CWidget::run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

	/**
	 * Run widget.
	 */
	public function run()
	{
		parent::run();
		$this->htmlOptions['id'] = $this->map->id;
		echo Html::tag($this->tagName, $this->htmlOptions, '');
		$this->onAfterRender(new \CEvent($this));
	}
开发者ID:Aplay,项目名称:Fastreview_site,代码行数:10,代码来源:Canvas.php

示例2: run

 /**
  * Run the widget
  */
 public function run()
 {
     $this->publishAssets();
     $this->registerClientScripts();
     $js = $this->createJsCode();
     $this->clientScript->registerScript('jnotify_init', $js, CClientScript::POS_HEAD);
     parent::run();
 }
开发者ID:yunsite,项目名称:my-advertise,代码行数:11,代码来源:JNotify.php

示例3: run

 public function run()
 {
     parent::run();
     $criteria = new CDbCriteria();
     $criteria->order = 't.order ASC';
     $menu = Menu::model()->findAll($criteria);
     $this->render('home_menu_bar');
 }
开发者ID:nctruong,项目名称:inputen,代码行数:8,代码来源:home_menu_bar.php

示例4: run

 public function run()
 {
     /** @var  $detector \Device */
     $isMobile = Yii::app()->device->isDevice('mobile') ? true : false;
     parent::run();
     $model = new Place();
     $this->render($this->view ? $this->view : 'default', ['model' => $model, 'mobile' => $isMobile]);
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:8,代码来源:SearchPark.php

示例5: run

 public function run()
 {
     parent::run();
     $criteria = "(acos(sin({$this->newLat})*sin(radians(latitude)) + cos({$this->newLat})*cos(radians(latitude))*cos(radians(longitude)-({$this->newLng})))*{$this->radius})";
     $limit = !empty($this->count) ? " LIMIT " . $this->count : "";
     $command = Yii::app()->db->createCommand("SELECT  *, " . $criteria . " AS 'distance' FROM transportStations WHERE " . $criteria . " <= " . $this->maxDistKm . " ORDER BY " . $criteria . $limit);
     $transportStations = $command->queryAll();
     $this->render($this->view ? $this->view : 'default', ['transportStations' => $transportStations, 'thisLatitude' => $this->lat, 'thisLongitude' => $this->lng, 'mapObject' => $this->mapObject, 'mapJourneyButton' => $this->mapJourneyButton, 'id' => $this->id]);
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:9,代码来源:nearestPlaces.php

示例6: run

 public function run()
 {
     parent::run();
     $criteria = new CDbCriteria();
     $criteria->order = 't.order ASC';
     $menu = Menu::model()->findAll($criteria);
     $data['adv'] = Advertisement::model()->findAll("state = 1");
     $this->render('bottom_logos', $data);
 }
开发者ID:nctruong,项目名称:inputen,代码行数:9,代码来源:bottom_logos.php

示例7: run

 public function run()
 {
     parent::run();
     if ($this->dataProvider === null) {
         throw new CException(Yii::t('ext.mobile', '"dataProvider" field must be set.'));
     }
     if ($this->itemView === null) {
         throw new CException(Yii::t('ext.mobile', '"itemView" field must be set.'));
     }
     $this->render('body');
 }
开发者ID:stpncpe,项目名称:cbdbx,代码行数:11,代码来源:ListView.php

示例8: run

 public function run()
 {
     $limit = NewsConfig::model()->findByPk(1, array('select' => 'widget_count'));
     $limit = $limit->widget_count;
     $criteria = new CDbCriteria();
     $criteria->compare('public', 1);
     $criteria->limit = $limit;
     $criteria->order = 'date DESC';
     $news = News::model()->findAll($criteria);
     $this->render('lastnews', array('news' => $news));
     return parent::run();
 }
开发者ID:xPashaNx,项目名称:diet,代码行数:12,代码来源:LastNewsWidget.php

示例9: run

 public function run()
 {
     $attribute = $this->attribute;
     $idoftxtfield = get_class($this->model) . "_" . $this->attribute;
     $idoftxtfield2 = get_class($this->model) . "DD" . $this->attribute;
     $idofulmenu = get_class($this->model) . "-" . $this->attribute . "-ul";
     $varname = $idoftxtfield . "js";
     echo $this->form->hiddenField($this->model, $this->attribute);
     echo $this->getul($this->data, " id='" . $idofulmenu . "' class='mcdropdown_menu'");
     echo "\n\t\t<input type=\"text\" size=\"45\" value=\"" . $this->model->{$attribute} . "\" id=\"" . $idoftxtfield2 . "\">\n\t\t<script type=\"text/javascript\">\n\t\tvar " . $varname . "=null;\n\t\t\$(document).ready(function (){\n\t\t\$('#" . $idoftxtfield2 . "').mcDropdown('#" . $idofulmenu . "',{allowParentSelect: true,select:function(){\n\t\t\$('#" . $idoftxtfield . "').val(" . $varname . ".getValue()[0]);\n\t}});\n\t" . $varname . "= \$('#" . $idoftxtfield2 . "').mcDropdown();\n\t});\n\n\t</script>";
     parent::run();
 }
开发者ID:kit9,项目名称:ERP_Accounting_Indonesia,代码行数:12,代码来源:McDropdown.php

示例10: run

 /**
  * @return void
  */
 public function run()
 {
     parent::run();
     // save & clean buffer
     $content = ob_get_contents();
     ob_end_clean();
     if ($this->outputBuffer) {
         echo EModal::$buffer;
     } else {
         EModal::$buffer .= $this->render('modal', array('id' => $this->id, 'content' => $content), true);
     }
 }
开发者ID:humantech,项目名称:ppma,代码行数:15,代码来源:EModal.php

示例11: run

 public function run()
 {
     // this method is called by CController::endWidget()
     $this->publishAssets();
     $this->registerClientScripts();
     $this->htmlOptions['id'] = $this->getId();
     echo "\n\n";
     echo CHtml::openTag('div', $this->htmlOptions) . "\n";
     echo 'The chart will appear within this DIV. This text will be replaced by the chart.' . "\n";
     echo CHtml::closeTag('div');
     // $this->renderChart();
     parent::run();
     echo "\n<!-- Fusion Chart " . $this->getId() . " -->\n";
 }
开发者ID:vman747,项目名称:virex,代码行数:14,代码来源:FusionChart.php

示例12: run

 public function run()
 {
     parent::run();
     $js = '';
     if (isset($this->watchElement)) {
         $js .= "\$('{$this->watchElement}').one('change', function() {";
     }
     $js .= "\$(window).bind('beforeunload', function() {\r\r\n                return \"" . $this->message . "\" ;\r\r\n            });";
     $js .= "\$('input[type=\"submit\"]').bind('click', function(){\r\r\n                window.onbeforeunload = function(){};\r\r\n                \$(window).unbind('beforeunload');\r\r\n            });";
     if (isset($this->watchElement)) {
         $js .= "});";
     }
     Yii::app()->clientScript->registerCoreScript('jquery');
     Yii::app()->clientScript->registerScript($this->getId(), $js, CClientScript::POS_READY);
 }
开发者ID:hipogea,项目名称:zega,代码行数:15,代码来源:AskToSaveWork.php

示例13: run

 public function run()
 {
     $galleryConfig = GalleryConfig::model()->find();
     $displayMode = $galleryConfig->display_mode;
     switch ($displayMode) {
         case 0:
             $gallery = Gallery::getFirstGallery();
             break;
         case 1:
             $gallery = Gallery::getRandomGallery();
             break;
         case 2:
             $gallery = Gallery::getSelectedGallery($galleryConfig->selected_gallery_id);
             break;
     }
     $this->render('gallery', array('gallery' => $gallery));
     return parent::run();
 }
开发者ID:xPashaNx,项目名称:diet,代码行数:18,代码来源:GalleryWidget.php

示例14: run

 /**
  * @method run
  */
 public function run()
 {
     $reviewsConfig = ReviewsConfig::model()->find();
     $criteria = new CDbCriteria();
     $criteria->order = 'date_create DESC';
     if ($reviewsConfig->premoder and Yii::app()->user->isGuest) {
         $criteria->condition = 'public = :public';
         $criteria->params = array(':public' => true);
     }
     $dataProvider = Reviews::model()->findAll($criteria);
     /*
             $dataProvider = new CActiveDataProvider('Reviews', array(
                 'criteria' => $criteria,
                 'pagination' => false,
             ));
     */
     $this->render('reviews', array('dataProvider' => $dataProvider));
     return parent::run();
 }
开发者ID:xPashaNx,项目名称:diet,代码行数:22,代码来源:ReviewsWidget.php

示例15: run

 public function run()
 {
     parent::run();
     $model = new Deal();
     $this->render($this->view ? $this->view : 'default', array('model' => $model, 'type' => $this->type, 'minPrices' => Util::getPropertyPrices("minimum"), 'maxPrices' => Util::getPropertyPrices("maximum"), 'isMobile' => Yii::app()->device->isDevice('mobile')));
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:6,代码来源:SearchProperty.php


注:本文中的CWidget::run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。