當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。