Execute the widget.

@return string the widget markup.
173020
public function run()
    {
        $tag = ArrayHelper::remove($this->containerOptions, 'tag', 'div');
        $html[] = Html::beginTag($tag, $this->containerOptions);
        if ($this->renderHiddenInput) {
            $html[] = $this->renderHiddenInput();
        }

        $html[] = Html::beginTag('div', ['class' => 'chips']);

        $html[] = Html::endTag('div');
        $html[] = Html::endTag($tag);
        return implode("\n", $html);
    }
1253994
public function run()
    {
        //return Html::tag($this->tagName, $this->encodeLabel ? Html::encode($this->label) : $this->label, $this->options);
        $html = '';
        if ($this->image !== null) {
            $html .= $this->renderImage();
        }
        if ($this->content !== null) {
            $html .= $this->renderContent();
        }
        if ($this->action !== null) {
            $html .= $this->renderAction();
        }
        if ($this->defaultClass) {
            Html::addCssClass($this->options, $this->defaultClass);
        }
        return Html::tag('div', $html, $this->options);
    }
523545
public function execute()
    {
        $data = $this->getRequest()->getPostValue();
        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultRedirectFactory->create();

        if ($data) {
            $data = $this->dataProcessor->validateRequireEntry($data);

            if (isset($data['is_active']) && $data['is_active'] === 'true') {
                $data['is_active'] = TemplateActive::STATUS_ENABLED;
            }

            if (empty($data['template_id'])) {
                $data['template_id'] = null;
            }

            /** @var Pdfgenerator $model */

            $id = $this->getRequest()->getParam('template_id');
            if ($id) {
                /** @var Pdfgenerator $model */
                $model = $this->templateRepository->getById($id);
            } else {
                unset($data['template_id']);
                /** @var Pdfgenerator $model */
                $model = $this->pdfgeneratorFactory->create();
            }

            $model->setData($data);
            $model->setData('update_time', time());

            if (!$this->dataProcessor->validate($data)) {
                return $resultRedirect->setPath('*/*/edit', [
                    'template_id' => $model->getTemplateId(),
                    '_current' => true
                ]);
            }

            try {
                $this->templateRepository->save($model);
                $this->messageManager->addSuccessMessage(__('You saved the template.'));
                $this->dataPersistor->clear('pdfgenerator_template');

                if ($this->getRequest()->getParam('back')) {
                    return $resultRedirect->setPath('*/*/edit', [
                        'template_id' => $model->getTemplateId(),
                        '_current' => true
                    ]);
                }

                return $resultRedirect->setPath('*/*/');
            } catch (LocalizedException $e) {
                $this->messageManager->addErrorMessage($e->getMessage());
            } catch (\Exception $e) {
                $this->messageManager->addExceptionMessage(
                    $e,
                    __('Something went wrong while saving the template.')
                );
            }

            $this->dataPersistor->set('pdfgenerator_template', $data);
            return $resultRedirect->setPath('*/*/edit', [
                'template_id' => $this->getRequest()->getParam('template_id')
            ]);
        }

        return $resultRedirect->setPath('*/*/');
    }
1329850
public function run()
    {
        // @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release
        Html::addCssClass($this->containerOptions, ['widget' => 'btn-group']);
        $options = $this->containerOptions;
        $tag = ArrayHelper::remove($options, 'tag', 'div');

        $this->registerPlugin('dropdown');
        return implode("\n", [
            Html::beginTag($tag, $options),
            $this->renderButton(),
            $this->renderDropdown(),
            Html::endTag($tag)
        ]);
    }
457892
public function execute(){
        $formOptions = $this->buildOptions();

        return $this->replaceTokens([
            ':options' => $formOptions,
            ':token_input' => true === $this->csrf ? $this->createCsrfField() : ''
        ]);
    }
869784
public function execute()
	{
		if ($this->arguments->getOpt('mechanism'))
		{
			$this->output->addLine($this->mechanism->getName());
		}
		else if ($this->arguments->getOpt('version'))
		{
			$this->output->addLine(\Hubzero\Version\Version::VERSION);
		}
		else
		{
			$this->status();
		}
	}
120369
public function run() {
		parent::run();
		WizardWidgetAsset::register($this->getView());


		// Wizard line calculation
		$step_count = count($this->steps)+($this->complete_content?1:0);
		$wizard_line_distribution = round(100 / $step_count); // Percentage
		$wizard_line_width = round(100 - $wizard_line_distribution); // Percentage
		$wizard_line = '';

		$tab_content = '';

		// Navigation tracker
		end($this->steps);
		$last_id = key($this->steps);

		$first = true;
		$class = '';

		foreach ($this->steps as $id => $step) {

			// Current or fist step is active, next steps are inactive (previous steps are available)
			if ($id == $this->start_step or (is_null($this->start_step) && $class == '')) {
				$class = 'active';
			} elseif ($class == 'active') {
				$class = 'disabled';
			}

			// Add icons to the wizard line
			$wizard_line .= Html::tag(
				'li',
				Html::a('<span class="round-tab"><i class="'.$step['icon'].'"></i></span>', '#step'.$id, [
					'data-toggle' => 'tab',
					'aria-controls' => 'step'.$id,
					'role' => 'tab',
					'title' => $step['title'],
				]),
				array_merge(
					[
						'role' => 'presentation',
						'class' => $class,
						'style' => ['width' => $wizard_line_distribution.'%']
					],
					isset($step['options']) ? $step['options'] : []
				)
			);

			// Setup tab content
			$tab_content .= '<div class="tab-pane '.$class.'" role="tabpanel" id="step'.$id.'">';
			$tab_content .= $step['content'];

			// Setup navigation buttons
			$buttons = [];
			$button_id = "{$this->id}_step{$id}_";
			if (!$first) {
				// Show previous button except on first step
				$buttons[] = $this->navButton('prev', $step, $button_id);
			}
			if (array_key_exists('skippable', $step) and $step['skippable'] === true) {
				// Show skip button if specified
				$buttons[] = $this->navButton('skip', $step, $button_id);
			}
			if ($id == $last_id) {
				// Show save button on last step
				$buttons[] = $this->navButton('save', $step, $button_id);
			} else {
				// On all previous steps show next button
				$buttons[] = $this->navButton('next', $step, $button_id);
			}
			// Add buttons to tab content
			$tab_content .= Html::ul($buttons, ['class' => 'list-inline pull-right', 'encode' => false]);

			// Finish tab
			$tab_content .= '</div>';

			$first = false;
		}

		// Add a completed step if specified
		if ($this->complete_content) {
			$class = 'disabled';

			// Check if completed tab is set as start_step
			if ($this->start_step == 'completed') {
				$class = 'active';
			}

			// Add completed icon to wizard line
			$wizard_line .= Html::tag(
				'li',
				Html::a('<span class="round-tab"><i class="glyphicon glyphicon-ok"></i></span>', '#complete', [
					'data-toggle' => 'tab',
					'aria-controls' => 'complete',
					'role' => 'tab',
					'title' => 'Complete',
				]),
				[
					'role' => 'presentation',
					'class' => $class,
					'style' => ['width' => $wizard_line_distribution.'%']
				]
			);

			$tab_content .= '<div class="tab-pane '.$class.'" role="tabpanel" id="complete">'.$this->complete_content.'</div>';
		}

		// Start widget
		echo '<div class="wizard" id="'.$this->id.'">';

		// Render the steps line
		echo '<div class="wizard-inner"><div class="connecting-line" style="width:'.$wizard_line_width.'%"></div>';
		echo '<ul class="nav nav-tabs" role="tablist">'.$wizard_line.'</ul>';
		echo '</div>';

		// Render the content tabs
		echo '<div class="tab-content">'.$tab_content.'</div>';

		// Finalize the content tabs
		echo '<div class="clearfix"></div>';

		// Finish widget
		echo '</div>';
	}
292335
public function run()
	{
		$id = $this->id;
		$content = array();
		$items = $this->normalizeTabs($this->tabs, $content);

		ob_start();
		if ($this->addTabsNavBar) {
			echo '<div class="navbar"><div class="navbar-inner">';
		}
		$this->controller->widget(
			'booster.widgets.TbMenu',
			array(
				'stacked' => $this->stacked,
				'type' => $this->type,
				'encodeLabel' => $this->encodeLabel,
				'items' => $items,
			)
		);
		if ($this->addTabsNavBar) {
			echo '</div></div>';
		}
		$tabs = ob_get_clean();

		ob_start();
		echo '<div class="tab-content">';
		echo implode('', $content);
		echo $this->pagerContent;
		echo '</div>';
		$content = ob_get_clean();

		echo CHtml::openTag('div', $this->htmlOptions);
		echo $this->placement === self::PLACEMENT_BELOW ? $content . $tabs : $tabs . $content;
		echo '</div>';

		/** @var CClientScript $cs */
		$cs = Yii::app()->getClientScript();

		$cs->registerPackage('bootstrap.wizard');

		// Override options
		if ($this->type && !isset($this->options['class'])) {
			$this->options['class'] = $this->type;
		}

		$options = CJavaScript::encode($this->options);

		$cs->registerScript(__CLASS__ . '#' . $id, "jQuery('#{$id}').bootstrapWizard({$options});");

		foreach ($this->events as $name => $handler) {
			$handler = CJavaScript::encode($handler);
			$cs->registerScript(__CLASS__ . '#' . $id . '_' . $name, "jQuery('#{$id}').on('{$name}', {$handler});");
		}
	}
309409
public function run() {
    if($this->tagName == 'a') {
      echo Html::a($this->encodeLabel ? Html::encode($this->label) : $this->label, $this->url, $this->options);
    } else {
      $this->options['tabindex'] = '0';
      echo Html::tag($this->tagName, $this->encodeLabel ? Html::encode($this->label) : $this->label, $this->options);
    }
  }
1116499
public function handle()
    {
        // Widget class name is camel case.
        $widgetClassName = ucfirst($this->getWidgetName());

        // Widget class file is camel with php extension.
        $widgetClassFile = $widgetClassName.'.php';

        // CamelCase for template.
        $widgetClassTpl = lcfirst($this->getWidgetName());

        // Get class template.
        $widgetClassTemplate = $this->getTemplate('widgetClass');

        // Default create not on a global.
        $watch = 'false';

        // If not specific a theme, not a global also return an error.
        if ($this->option('global') === false and ! $this->argument('theme')){
            return $this->error('Please specific a theme name or use option -g to create as a global widget.');
        }
       
        $theme_path = base_path($this->config->get('theme.themeDir').'/'.$this->getTheme());
       
        if (is_dir($theme_path) === false){
            return $this->error('The theme "'.$this->getTheme().'" does not exist.');
        }

        // Create as a global use -g.
        if ($this->option('global') === true){
            $watch = 'true';
        }

        $widgetNamespace = $this->config->get('theme.namespaces.widget');

        // Prepare class template.
        $widgetClassTemplate = preg_replace(
            array('|\{widgetNamespace\}|', '|\{widgetClass\}|', '|\{widgetTemplate\}|', '|\{watch\}|'),
            array($widgetNamespace, $widgetClassName, $widgetClassTpl, $watch),
            $widgetClassTemplate
        );

        // Create widget directory.
        if (!$this->files->isDirectory(app_path().'/Widgets')){
            $this->files->makeDirectory(app_path().'/Widgets', 0777, true);
        }

        // Widget class already exists.
        if ($this->files->exists(app_path().'/Widgets/'.$widgetClassFile)){
            return $this->error('Widget "'.$this->getWidgetName().'" is already exists.');
        }

        // Create class file.
        $this->files->put(app_path().'/Widgets/'.$widgetClassFile, $widgetClassTemplate);

        // Make file example.
        $this->makeFile('widgets/'.$widgetClassTpl.'.blade.php', $this->getTemplate('widget.blade'));

        $this->info('Widget "'.$this->getWidgetName().'" has been created.');
    }
909733
public function run()
    {
        $this->registerPlugin('button');
        return Html::tag($this->tagName, $this->encodeLabel ? Html::encode($this->label) : $this->label, $this->options);
    }
838557
public function run()
    {
        $this->setMode();
        $this->checkBox();
        $this->checkCookie();
        $this->checkContent();
        $this->setDefaults();
        $this->initCookie();

        return $this->render(
                $this->mode == 'custom' 
                    ? $this->cookieView 
                    : 'box', 
                $this->prepareViewParams()
            );
    }
1009030
public function run()
    {
        echo Html::beginTag('div', ['class' => 'page-footer']);
        echo Html::beginTag('div', ['class' => 'page-footer-inner']);
        echo $this->html;
        echo Html::tag('div', Html::tag('i', '', ['class' => 'icon-arrow-up']), ['class' => 'scroll-to-top']);

        echo Html::endTag('div');   // page-footer-inner
        echo Html::endTag('div');   // page-footer
    }
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,
        ]);
    }
852245
public function run()
	{

		// Setup the form
		$form = $this->beginWidget('cii.widgets.CiiActiveForm', array(
		    'id'=>get_class($this->model),
		    'enableAjaxValidation'=>true,
		    'action' => $this->action,
		    'htmlOptions' => array(
		    	'class' => 'pure-form pure-form-aligned'
		    )
		));

			// Main Content
			$this->renderMain($form);

		// Close the form
		$this->endWidget();
	}
536882
private function execute()
    {
        $this->connect();
        try {
            $this->getSyntax();
            $this->command->execute();

            if (preg_match('/^(SELECT|SHOW) /i', $this->select))
                $this->result = $this->command->fetchAll();

        } catch (\PDOException $e) {
            $this->result = "<b>Erro ao Executar Comando: </b> {$e->getMessage()}";
            $this->erro = "<b>Erro ao Executar Comando</b> {$e->getMessage()}";
        }

        parent::setDefault();
    }
126076
public function execute()
    {
        $options = $this->options;
        $options[] = 'doNotSelfQlose';
        if (in_array('compress', $options)) {
            $options[] = 'inlineInner';
        }

        $Tag = new HTML\Tag('style', $this->args, $options);

        $Tag->open();
        $Tag->content();
        $Tag->close();
    }