Renders a radio button.
@return string the rendered content
179598
protected function radioButton()
	{
		$attribute = $this->attribute;
		list($hidden, $radioButton) = $this->getSeparatedSelectableInput();

		echo '<div class="controls">';
		echo ($hidden) ? $hidden . PHP_EOL : '';
		echo '<label class="radio" for="' . $this->getAttributeId($attribute) . '">';
		echo $radioButton . PHP_EOL;
		echo $this->model->getAttributeLabel($attribute);
		echo $this->getError() . $this->getHint();
		echo '</label></div>';
	}
848155
public function render()
    {
        foreach ($this->buttons as $button) {
            $this->getElement()->appendContent($this->renderButton($button));
        }

        return $this->getElement()->render();
    }
504899
public function render()
    {
        $returnValue = $this->renderLabel();
        
        $checkAll = false;
        if (isset($this->attributes['checkAll'])) {
            $checkAll = (bool) $this->attributes['checkAll'];
            unset($this->attributes['checkAll']);
        }
        $i = 0;
        $checked = 0;
        $returnValue .= '<div class="form_radlst form_checklst plain">';
        $readOnlyOptions = $this->getReadOnly();
        foreach ($this->options as $optionId => $optionLabel) {
            $readOnly = isset($readOnlyOptions[$optionId]);
            if($readOnly){
                $returnValue .= '<div class="grid-row readonly">';
            }else{
                $returnValue .= '<div class="grid-row">';
            }

            $returnValue .= '<div class="col-1">';
            $returnValue .= "<input type='checkbox' value='{$optionId}' name='{$this->name}_{$i}' id='{$this->name}_{$i}' ";
            $returnValue .= $this->renderAttributes();

            if ($readOnly) {
                $returnValue .= "disabled='disabled' readonly='readonly' ";
            }

            if (in_array($optionId, $this->values)) {
                $returnValue .= " checked='checked' ";
                $checked ++;
            }
            $returnValue .= ' />';
            $returnValue .= '</div><div class="col-10">';
            $returnValue .= "<label class='elt_desc' for='{$this->name}_{$i}'>" . _dh($optionLabel) . "</label>";
            $returnValue .= '</div><div class="col-1">';
            if ($readOnly) {
                $readOnlyReason = $readOnlyOptions[$optionId];
                if(!empty($readOnlyReason)){
                    $returnValue .= '<span class="tooltip-trigger icon-warning" data-tooltip="~ .tooltip-content" data-tooltip-theme="info"></span><div class="tooltip-content">'._dh($readOnlyReason).'</div>';
                }
            }
            $returnValue .= '</div></div>';
            $i ++;
        }
        $returnValue .= "</div>";
        
        // add a small link
        if ($checkAll) {
            if ($checked == (count($this->options) - count($readOnlyOptions))) {
                $returnValue .= "<span class='checker-container'><a id='{$this->name}_checker' class='box-checker box-checker-uncheck' href='#'>" . __('Uncheck All') . "</a></span>";
            } else {
                $returnValue .= "<span class='checker-container'><a id='{$this->name}_checker' class='box-checker' href='#'>" . __('Check All') . "</a></span>";
            }
        }
        
        return (string) $returnValue;
    }
567908
public function render()
    {
        $html = [];

        foreach ($this->all() as $key => $value) {
            if (is_null($value)) {
                continue;
            }

            if (is_numeric($key)) {
                $key = $value;
            }

            $html[] = $key . '="' . e($value) . '"';
        }

        return implode(' ', array_filter($html));
    }
482919
public function render()
    {
        /** @var CommandInterface[] $commands */
        $commands = $this
            ->environment
            ->getDataDefinition()
            ->getDefinition(Contao2BackendViewDefinitionInterface::NAME)
            ->getGlobalCommands()
            ->getCommands();

        if (!\is_array($commands)) {
            $commands = [];
        }

        $buttons = [];
        foreach ($commands as $command) {
            if ($command->isDisabled()) {
                continue;
            }
            $buttons[$command->getName()] = $this->renderButton($command);
        }

        $buttonsEvent = new GetGlobalButtonsEvent($this->environment);
        $buttonsEvent->setButtons($buttons);
        $this->dispatcher->dispatch(GetGlobalButtonsEvent::NAME, $buttonsEvent);

        return '<div id="tl_buttons">' . \implode('', $buttonsEvent->getButtons()) . '</div>';
    }
259772
public function render()
    {
        if ($this->hasButtons()) {
            foreach ($this->buttons as $button) {
                $this->childNodes->push($button);
            }
        }

        return parent::render();
    }
1162830
public function render()
	{
		$html = array();

		// Start toolbar div.
		$html[] = '<div class="toolbar-list" id="' . $this->_name . '">';
		$html[] = '<ul>';

		foreach ($this->_bar as $key => $button)
		{
			$this->_bar[$key][9] = array();
			if ($button[0] == 'Separator')
			{
				continue;
			}
			if (!isset($this->_bar[$key - 1]) || $this->_bar[$key - 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'first';
			}
			if (!isset($this->_bar[$key + 1]) || $this->_bar[$key + 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'last';
			}
		}

		// Render each button in the toolbar.
		foreach ($this->_bar as $button)
		{
			$html[] = $this->renderButton($button);
		}

		// End toolbar div.
		$html[] = '</ul>';
		$html[] = '</div>';

		return implode("\n", $html);
	}
995798
public function radioButton(RadioButton $radioButton)
    {
        $tag = new Tag('input');
        $tag->setAttribute('type', 'radio');

        if (!$radioButton->getId() && $radioButton->getLabel()) {
            $radioButton->setId('field-' . uniqid('radiobutton'));
        }

        if ($radioButton->isChecked()) {
            $tag->setAttribute('checked', 'checked');
        }

        $html = $this->parseTag($tag, $radioButton);

        if ($radioButton->getLabel()) {
            $label = new Tag('label', $radioButton->getLabel());
            $label->setAttribute('for', $radioButton->getId());
            $html .= $label->render();
        }

        return $html;
    }
368093
public function render()
    {
        Admin::script($this->script());

        $options = $this->getOptions()->map(function ($option) {
            $selected = ($option == $this->perPage) ? 'selected' : '';
            $url = app('request')->fullUrlWithQuery([$this->perPageName => $option]);

            return "<option value=\"$url\" $selected>$option</option>";
        })->implode("\r\n");

        $trans = [
            'show'    => trans('admin.show'),
            'entries' => trans('admin.entries'),
        ];

        return <<<EOT

<label class="control-label pull-right" style="margin-right: 10px; font-weight: 100;">

        <small>{$trans['show']}</small>&nbsp;
        <select class="input-sm {$this->grid->getPerPageName()}" name="per-page">
            $options
        </select>
        &nbsp;<small>{$trans['entries']}</small>
    </label>

EOT;
    }
1338248
public function render()
    {
        if ($this->closable) {
            $this->createDismissButton();
        }

        $this->getElement()->setAppendContent();

        return $this->getElement()->render();
    }
1045046
public function run()
	{
		$cs=Yii::app()->getClientScript();
		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'];
		else
			$this->htmlOptions['name']=$name;

		if($this->buttonType=='buttonset')
		{
			echo CHtml::closeTag($this->htmlTag);
			$cs->registerScript(__CLASS__.'#'.$id,"jQuery('#{$id}').buttonset();");
		}
		else
		{
			switch($this->buttonType)
			{
				case 'submit':
					echo CHtml::submitButton($this->caption,$this->htmlOptions)."\n";
					break;
				case 'button':
					echo CHtml::htmlButton($this->caption,$this->htmlOptions)."\n";
					break;
				case 'link':
					echo CHtml::link($this->caption,$this->url,$this->htmlOptions)."\n";
					break;
				case 'radio':
					if($this->hasModel())
					{
						echo CHtml::activeRadioButton($this->model,$this->attribute,$this->htmlOptions);
						echo CHtml::label($this->caption,CHtml::activeId($this->model,$this->attribute))."\n";
					}
					else
					{
						echo CHtml::radioButton($name,$this->value,$this->htmlOptions);
						echo CHtml::label($this->caption,$id)."\n";
					}
					break;
				case 'checkbox':
					if($this->hasModel())
					{
						echo CHtml::activeCheckbox($this->model,$this->attribute,$this->htmlOptions);
						echo CHtml::label($this->caption,CHtml::activeId($this->model,$this->attribute))."\n";
					}
					else
					{
						echo CHtml::checkbox($name,$this->value,$this->htmlOptions);
						echo CHtml::label($this->caption,$id)."\n";
					}
					break;
				default:
					throw new CException(Yii::t('zii','The button type "{type}" is not supported.',array('{type}'=>$this->buttonType)));
			}

			$options=CJavaScript::encode($this->options);
			if($this->onclick!==null)
			{
				if(!($this->onclick instanceof CJavaScriptExpression))
					$this->onclick=new CJavaScriptExpression($this->onclick);
				$click=CJavaScript::encode($this->onclick);
				$cs->registerScript(__CLASS__.'#'.$id,"jQuery('#{$id}').button($options).click($click);");
			}
			else
				$cs->registerScript(__CLASS__.'#'.$id,"jQuery('#{$id}').button($options);");
		}
	}
467153
public function renderButton()
    {
        if (($button = $this->button) !== false) {
            $tag = ArrayHelper::remove($button, 'tag', 'a');
            $label = ArrayHelper::remove($button, 'label',
                Inflector::camel2words(Inflector::id2camel($this->scenario)));
            if ($tag === 'button' && !isset($button['type'])) {
                $toggleButton['type'] = 'button';
            }

            if ($button['disabled']) {
                $button = ArrayHelper::merge([
                    'onClick' => new JsExpression('return false'),
                ], $button);
            } else {
                $button = ArrayHelper::merge([
                    'data-toggle' => 'modal',
                    'data-target' => "#{$this->getModalId()}",
                ], $button);
            }

            if ($tag === 'a' && empty($button['href'])) {
                $button['href'] = '#';
            }

            echo Html::tag($tag, $label, $button);
        }
    }
958824
public function render(): string
    {
        $tag = $this->wrapperTagName
            ? new Tag($this->wrapperTagName, $this->htmlAttributes)
            : null;

        $contents = array_map([$this, 'renderItem'], $this->items);

        $wrappedContents = $tag ? $tag->withContents($contents) : implode('', $contents);

        $menu = $this->prepend.$wrappedContents.$this->append;

        if (! empty($this->wrap)) {
            return Tag::make($this->wrap[0], new Attributes($this->wrap[1]))->withContents($menu);
        }

        return $menu;
    }
983740
public function run()
    {
        if ($this->label !== false) {
            $label = $this->encodeLabel ? Html::encode($this->label) : $this->label;
        } else {
            $label = '';
        }

        $content = $this->renderIcon() . $label;

        return $this->tagName === 'button' ? Html::button($content, $this->options) : Html::tag($this->tagName, $content, $this->options);
    }
319992
public function renderButtons() {
		
		$output = '';
		foreach ($this->getButtons() as $button) {
			$output .= $this->renderElement($button);
		}

		if ($output !== '' && $this->activeFormWidget->type !== TbActiveForm::TYPE_INLINE) {
			$output = "<div class=\"form-actions\">\n" . $output . "</div>\n";
		}

		return $output;
	}
330486
public function render()
    {
        $reg = $this->registry;
        ?>
        <div class="wrap">
            <h1><?php echo $reg['page_title']; ?></h1>
            <form action="options.php" method="post">
                <?php settings_errors($reg['option_name']) ?>
                <?php settings_fields($reg['option_name']); ?>
                <?php do_settings_sections($reg['option_name']); ?>
                <?php submit_button(); ?>
            </form>
        </div>
        <?php
    }
1187906
public function render(): string
    {
        $this->tags();

        if ($this->isLink === true) {
            $this->html .= "<a href=\"{$this->link}\">";
        }

        $element_attributes = '';
        foreach ($this->element_attributes as $attribute => $value) {
            if ($attribute == "color") {
                $element_attributes .= "style=\"{$attribute}: $value\"";
            } else {
                $element_attributes .= "{$attribute}=\"{$value}\" ";
            }
        }

        foreach ($this->tags as $i => $tag) {
            if ($i === 0 && strlen($element_attributes) > 0) {
                $this->html .= "<{$tag} " . rtrim($element_attributes) . '>';
            } else {
                $this->html .= "<{$tag}>";
            }
        }

        $this->html .= $this->escape($this->insert);

        foreach (array_reverse($this->tags) as $tag) {
            $this->html .= "</{$tag}>";
        }

        if ($this->isLink === true) {
            $this->html .= '</a>';
        }

        return $this->html;
    }