### .run()

Runs the widget.
773686
public function run() {
		
		echo CHtml::openTag('nav', $this->htmlOptions);
		echo '<div class="' . $this->getContainerCssClass() . '">';
		
		echo '<div class="navbar-header">';
		if($this->collapse) {
			$this->controller->widget('booster.widgets.TbButton', $this->toggleButtonWidgetOptions);
		}
		
		if ($this->brand !== false) {
			if ($this->brandUrl !== false) {
				echo CHtml::openTag('a', $this->brandOptions) . $this->brand . '</a>';
			} else {
				unset($this->brandOptions['href']); // spans cannot have a href attribute
				echo CHtml::openTag('span', $this->brandOptions) . $this->brand . '</span>';
			}
		}
		echo '</div>';
		
		echo '<div class="collapse navbar-collapse" id="'.self::CONTAINER_PREFIX.$this->id.'">';
		foreach ($this->items as $item) {
			if (is_string($item)) {
				echo $item;
			} else {
				if (!isset($item['type'])) {
					$item['type'] = 'navbar';
				}
				
				if (isset($item['class'])) {
					$className = $item['class'];
					unset($item['class']);

					$this->controller->widget($className, $item);
				}
			}
		}
		echo '</div></div></nav>';
	}
812546
public function run() {

		$registryKey = $this->generateRegistryItemKey();

		if (!count($this->filteredBy) && !$this->jsonStorage->getLength($this->registry)) {
			return;
		}

		echo "<tr>\n";
		$cols = count($this->grid->columns);
		echo "<td colspan='{$cols}'>\n";
		echo "<div id='{$this->getId()}'>\n";
		if (count($this->filteredBy)) {
			echo '<p><span class="label label-success">Filtered by</span> ' . $this->displayExtendedFilterValues(
				$this->filteredBy
			) . '</p>';
		}

		$this->displaySaveButton($registryKey);
		$this->displaySavedFilters($registryKey);

		echo "</div>\n";
		echo "</td>\n";
		echo "</tr>\n";
	}
198907
public function run()
    {
        $tag = ArrayHelper::remove($this->collapseOptions, 'tag', 'div');
        echo Html::endTag($tag) . "\n";
        if ($this->renderInnerContainer) {
            echo Html::endTag('div') . "\n";
        }
        $tag = ArrayHelper::remove($this->options, 'tag', 'nav');
        echo Html::endTag($tag);
        BootstrapPluginAsset::register($this->getView());
    }
745037
public function run()
    {
        // todo: think of a better way of doing this.
        $script = "jQuery('{$this->selector}').attr('data-spy', 'scroll');";
        if (isset($this->target)) {
            $script .= "jQuery('{$this->selector}').attr('data-target', '{$this->target}');";
        }
        if (isset($this->offset)) {
            $script .= "jQuery('{$this->selector}').attr('data-offset', '{$this->offset}');";
        }
        Yii::app()->clientScript->registerScript($this->getId(), $script, CClientScript::POS_BEGIN);
        $this->registerEvents($this->selector, $this->events);
    }
919617
public function run()
    {
        echo Html::a($this->buttonLabel, false, [
            'value' => $this->url,
            'data-toggle' => 'tooltip', 'title' => $this->tooltipTitle,
            'class' => "showModalButton {$this->buttonCssClass}",
            'accesskey' => $this->accessKey,
            'name' => $this->name,
        ]);
    }
789806
public function run()
    {
        $this->registerAssets();
        
        if ($this->hasModel()) {
            echo Html::activeCheckbox($this->model, $this->attribute, $this->options);
        } else {
            $checked = ArrayHelper::remove($this->options, 'checked', false);
            echo Html::checkbox($this->name, $checked, $this->options);
        }
    }
392717
public function run()
	{
		list($name,$id)=$this->resolveNameID();

		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$id;
		if(isset($this->htmlOptions['name']))
			$name=$this->htmlOptions['name'];

		if($this->hasModel())
			echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);
		else
			echo CHtml::textField($name,$this->value,$this->htmlOptions);

		if($this->sourceUrl!==null)
			$this->options['source']=CHtml::normalizeUrl($this->sourceUrl);
		else
			$this->options['source']=$this->source;

		$options=CJavaScript::encode($this->options);
		Yii::app()->getClientScript()->registerScript(__CLASS__.'#'.$id,"jQuery('#{$id}').autocomplete($options);");
	}
229390
public function run()
    {
        $classes = $this->generateClass();
        
        echo Html::beginTag('div', ['class' => $classes])."\n";
        echo $this->renderItems()."\n";
        echo Html::endTag('div')."\n";
    }
1316319
public function run()
    {
        // if there is no renderTo id, build the layer with current id and initialize renderTo option
        if (!isset($this->pluginOptions['chart']) || !isset($this->pluginOptions['chart']['renderTo'])) {
            echo CHtml::openTag('div', $this->htmlOptions);
            echo CHtml::closeTag('div');

            if (isset($this->pluginOptions['chart']) && is_array($this->pluginOptions['chart'])) {
                $this->pluginOptions['chart']['renderTo'] = $this->htmlOptions['id'];
            } else {
                $this->pluginOptions['chart'] = array('renderTo' => $this->htmlOptions['id']);
            }

        }
        $this->registerClientScript();
    }
118889
public function run() {
        $configs = Json::encode($this->configs);

        
        $this->getView()->registerJs('
            var configChart = $.parseJSON(\'' . $configs . '\');
                console.log(configChart);
            $(function () {
                // Set up the chart
                var chart = new Highcharts.Chart(configChart);
                    
                // Activate the sliders
                $("#R0").on("change", function(){
                    chart.options.chart.options3d.alpha = this.value;
                    showValues();
                    chart.redraw(false);
                });
                $("#R1").on("change", function(){
                    chart.options.chart.options3d.beta = this.value;
                    showValues();
                    chart.redraw(false);
                });

                function showValues() {
                    $("#R0-value").html(chart.options.chart.options3d.alpha);
                    $("#R1-value").html(chart.options.chart.options3d.beta);
                }
                showValues();
            });
        ');
        echo '
            <div id="container"></div><div id="sliders">
	<table>
		<tr><td>Alpha Angle</td><td><input id="R0" type="range" min="0" max="45" value="15"/> <span id="R0-value" class="value"></span></td></tr>
	    <tr><td>Beta Angle</td><td><input id="R1" type="range" min="0" max="45" value="15"/> <span id="R1-value" class="value"></span></td></tr>
	</table>
        </div>';
    }
56095
public function run()
	{
		switch ($this->type)
		{
			case self::TYPE_CHECKBOX:
				$this->checkBox();
				break;

			case self::TYPE_CHECKBOXLIST:
				$this->checkBoxList();
				break;

			case self::TYPE_CHECKBOXLIST_INLINE:
				$this->checkBoxListInline();
				break;

			case self::TYPE_DROPDOWN:
				$this->dropDownList();
				break;

			case self::TYPE_FILE:
				$this->fileField();
				break;

			case self::TYPE_PASSWORD:
				$this->passwordField();
				break;

			case self::TYPE_RADIO:
				$this->radioButton();
				break;

			case self::TYPE_RADIOLIST:
				$this->radioButtonList();
				break;

			case self::TYPE_RADIOLIST_INLINE:
				$this->radioButtonListInline();
				break;

			case self::TYPE_RADIOBUTTONGROUPSLIST:
				$this->radioButtonGroupsList();
				break;

			case self::TYPE_TEXTAREA:
				$this->textArea();
				break;

			case self::TYPE_TEXT:
				$this->textField();
				break;

			case self::TYPE_CAPTCHA:
				$this->captcha();
				break;

			case self::TYPE_UNEDITABLE:
				$this->uneditableField();
				break;

			case self::TYPE_DATEPICKER:
				$this->datepickerField();
				break;

			case self::TYPE_REDACTOR:
				$this->redactorJs();
				break;

			case self::TYPE_MARKDOWNEDITOR:
				$this->markdownEditorJs();
				break;

			case self::TYPE_HTML5EDITOR:
				$this->html5Editor();
				break;

			case self::TYPE_DATERANGEPICKER:
				$this->dateRangeField();
				break;

			case self::TYPE_TOGGLEBUTTON:
				$this->toggleButton();
				break;

			case self::TYPE_COLORPICKER:
				$this->colorpickerField();
				break;

			case self::TYPE_CKEDITOR:
				$this->ckEditor();
				break;

			// Adding timepicker (Sergii)
			case self::TYPE_TIMEPICKER:
				$this->timepickerField();
				break;

			case self::TYPE_SELECT2:
				$this->select2Field();
				break;

			default:
				throw new CException(__CLASS__ . ': Failed to run widget! Type is invalid.');
		}
	}
34897
public function run()
    {
        echo Html::beginTag('div', ['class' => 'page-sidebar-wrapper']);
        echo Html::beginTag('div', ['class' => 'page-sidebar navbar-collapse collapse']);
        echo Menu::widget([
            'items' => $this->items,
            'encodeLabels' => false,
            'options' => ['class' => 'page-sidebar-menu', 'data-keep-expanded' => "false", 'data-auto-scroll' => "true", 'data-slide-speed' => 200],
            'submenuTemplate' => "\n<ul class=\"sub-menu\">\n{items}\n</ul>\n"
        ]);
        echo Html::endTag('div');   // page-sidebar-wrapper
        echo Html::endTag('div');   // page-sidebar
    }
917844
public function run()
	{
		$script = "jQuery('{$this->selector}').attr('data-spy', 'scroll');";

		if (isset($this->target)) {
			$script .= "jQuery('{$this->selector}').attr('data-target', '{$this->target}');";
		}

		if (isset($this->offset)) {
			$script .= "jQuery('{$this->selector}').attr('data-offset', '{$this->offset}');";
		}

		/** @var CClientScript $cs */
		$cs = Yii::app()->getClientScript();
		$cs->registerScript(__CLASS__ . '#' . $this->selector, $script, CClientScript::POS_BEGIN);

		foreach ($this->events as $name => $handler) {
			$handler = CJavaScript::encode($handler);
			$cs->registerScript(
				__CLASS__ . '#' . $this->selector . '_' . $name,
				"jQuery('{$this->selector}').on('{$name}', {$handler});"
			);
		}
	}
31105
public function run()
	{
		$id = $this->htmlOptions['id'];

		echo CHtml::openTag('div', $this->htmlOptions);

		foreach ($this->alerts as $type => $alert)
		{
			if (is_string($alert))
			{
				$type = $alert;
				$alert = array();
			}

			if (isset($alert['visible']) && $alert['visible'] === false)
				continue;

			if (Yii::app()->user->hasFlash($type))
			{
				$classes = array('alert in');

				if (!isset($alert['block']))
					$alert['block'] = $this->block;

				if ($alert['block'] === true)
					$classes[] = 'alert-block';

				if (!isset($alert['fade']))
					$alert['fade'] = $this->fade;

				if ($alert['fade'] === true)
					$classes[] = 'fade';

				$validTypes = array(self::TYPE_SUCCESS, self::TYPE_INFO, self::TYPE_WARNING, self::TYPE_ERROR, self::TYPE_DANGER);

				if (in_array($type, $validTypes))
					$classes[] = 'alert-'.$type;

				if (!isset($alert['htmlOptions']))
					$alert['htmlOptions'] = array();

				$classes = implode(' ', $classes);
				if (isset($alert['htmlOptions']['class']))
					$alert['htmlOptions']['class'] .= ' '.$classes;
				else
					$alert['htmlOptions']['class'] = $classes;

				echo CHtml::openTag('div', $alert['htmlOptions']);

				if ($this->closeText !== false && !isset($alert['closeText']))
					$alert['closeText'] = $this->closeText;
				else
					$alert['closeText'] = false;

				if (isset($alert['closeText']) && $alert['closeText'] !== false)
					echo '<a class="close" data-dismiss="alert">'.$alert['closeText'].'</a>';

				echo Yii::app()->user->getFlash($type);

				echo '</div>';
			}
		}

		echo '</div>';

		$selector = "#{$id} .alert";
		$id .= '_'.self::$_containerId++;

		/** @var CClientScript $cs */
		$cs = Yii::app()->getClientScript();
		//$cs->registerScript(__CLASS__.'#'.$id, "jQuery('{$selector}').alert();");

		foreach ($this->events as $name => $handler)
		{
			$handler = CJavaScript::encode($handler);
			$cs->registerScript(__CLASS__.'#'.$id.'_'.$name, "jQuery('{$selector}').on('{$name}', {$handler});");
		}
	}
1222597
public function run()
  {
    $this->renderContent();
    $content=ob_get_clean();
    if($this->hideOnEmpty && trim($content)==='')
      return;
    echo $this->_beginTag;
    echo $content;
    echo '</div>';
    echo Html::endTag($this->tagName);    
  }
628679
public function run()
    {
        $view = $this->getView();

        $jsOptions = Json::encode([
            'id' => $this->id
        ]);

        $view->registerJs(<<<JS
        (function(sx, $, _)
        {
            sx.classes.FormUseTabs = sx.classes.Component.extend({

                _init: function()
                {
                    this.activeTab = window.location.hash.replace("#","");
                },

                _onDomReady: function()
                {
                    var self = this;

                    var JForm = $("#" + this.get('id'));
                    
                    var counter = 0;
                    $('.sx-form-tab').each(function(i,s)
                    {
                        counter = counter + 1;

                        var Jcontroll = $("<a>", {
                            'href' : '#' + $(this).attr('id'),
                            'aria-controls' : $(this).attr('id'),
                            'role' : 'tab',
                            'data-toggle' : 'tab',
                            'class' : 'nav-link',
                        }).append($(this).data('name'));

                        Jcontroll.on('click', function()
                        {
                            location.href = $(this).attr("href");
                        });

                        var Jli = $("<li>", {
                            'role' : 'presentation',
                            'class' : 'presentation nav-item',
                        }).append(Jcontroll);


                        if (self.activeTab)
                        {
                             if (self.activeTab == $(this).attr('id'))
                            {
                                Jli.addClass("active");
                                Jcontroll.addClass("active");
                                $(this).addClass("active");
                            }
                        } else
                        {
                            if (counter == 1)
                            {
                                Jli.addClass("active");
                                Jcontroll.addClass("active");
                                $(this).addClass("active");
                            }
                        }

                        $('.sx-form-tab-panel .nav').append(Jli);
                    });
                    
                    _.defer(function()
                    {
                        $('.sx-pre-loader-form', JForm).hide();
                        $('.sx-form-tab-panel', JForm).fadeIn();
                    });
                },
            });

            new sx.classes.FormUseTabs({$jsOptions});

        })(sx, sx.$, sx._);
JS
);

        $html = <<<HTML
            </div>
        </div>
HTML;

        return $html . parent::run();
    }
1165999
public function run()
    {
        echo Html::endTag('div');   //body
        if($this->afterBody)
            echo $this->afterBody;
        if($this->loading){
            echo Html::tag('div', Html::faicon(['refresh','spin']), ['class'=>'overlay']);
        }
        $this->_initFooter();
        echo Html::endTag('div');   // box
    }