Renders a checkbox.
@return string the rendered content
12942
protected function checkBox()
	{
		$attribute = $this->attribute;
		list($hidden, $checkbox) = $this->getSeparatedSelectableInput();

		echo '<div class="controls">';
		echo ($hidden) ? $hidden . PHP_EOL : '';
		echo '<label class="checkbox" for="' . $this->getAttributeId($attribute) . '">';
		echo $checkbox . PHP_EOL;
		echo $this->model->getAttributeLabel($attribute);
		echo $this->getError() . $this->getHint();
		echo '</label></div>';
	}
670
public function outputElement() : string
    {
        $selected = explode(',', $this->getValue());
        $disabled = $this->disabled;
        $hidden = $this->hidden;

        $return = '<div class="checkboxgroup">';
        foreach ($this->options as $val=>$txt) {
            if (in_array($val, $hidden)) {
                break;
            }
            $d = (in_array($val, $disabled)) ? ' disabled="disabled"' : '';
            $s = (in_array($val, $selected)) ? ' checked="checked"' : '';
            $return .= '<div><input id="cb-' . $val . '" type="checkbox" name="' . $this->attributes['name'] . '[]" value="' . $val . '" ' . $d . $s . ' /> <label class="cblabel" for="cb-' . $val . '">' . $txt . "</label></div>\n";
        }
        $return .= '</div>';

        return $return;
    }
944650
private function render()
    {
        if (empty($this->element)) {
            $this->textInput();
        }
        
        if (!isset($this->parts['{label}'])) {
            $this->label($this->label);
        }
        
        if (!isset($this->parts['{initValue}'])) {
            $this->initValue(null);
        }
    
        return str_replace([
            '{label}', '{initValue}', '{model}',
        ], [
            $this->parts['{label}'],
            $this->parts['{initValue}'],
            $this->getNgModel(),
        ], $this->element);
    }
318661
protected function _renderInput($checkbox, $context)
    {
        $input = $this->_templates->format('checkbox', [
            'name' => $checkbox['name'] . '[]',
            'value' => $checkbox['escape'] ? h($checkbox['value']) : $checkbox['value'],
            'templateVars' => $checkbox['templateVars'],
            'attrs' => $this->_templates->formatAttributes(
                $checkbox,
                ['name', 'value', 'text', 'options', 'label', 'val', 'type']
            )
        ]);

        if ($checkbox['label'] === false && strpos($this->_templates->get('checkboxWrapper'), '{{input}}') === false) {
            $label = $input;
        } else {
            $labelAttrs = is_array($checkbox['label']) ? $checkbox['label'] : [];
            $labelAttrs += [
                'for' => $checkbox['id'],
                'escape' => $checkbox['escape'],
                'text' => $checkbox['text'],
                'templateVars' => $checkbox['templateVars'],
                'input' => $input
            ];

            if ($checkbox['checked']) {
                $labelAttrs = $this->_templates->addClass($labelAttrs, 'selected');
            }

            $label = $this->_label->render($labelAttrs, $context);
        }

        return $this->_templates->format('checkboxWrapper', [
            'templateVars' => $checkbox['templateVars'],
            'label' => $label,
            'input' => $input
        ]);
    }
1050967
public function render()
    {
        if (array_key_exists($this->formType, $this->formsType)) {
            $this->form = new $this->formsType[$this->formType]
            (
                $this->idName,
                $this->elements,
                $this->method,
                $this->action
            );
        }
        return $this->form->render();
    }
782007
public function render(){
		if (!$this->init_flag){
			$this->init_flag=true;
			return "";
		}
		$res = $this->sql->get_variants($this->config->text[0]["db_name"],$this->request);
		return $this->render_set($res);
	}
1366340
public function render()
    {
        if ( ! $this->label->hasTextContent()) {
            $this->input->attributes->addAttributeClass('position-static');
        }

        return parent::render();
    }
1276470
public function render()
    {
        foreach ($this->groups as $group) {
            $this->getElement()->appendContent($group->render());
        }

        return $this->getElement()->render();
    }
415056
def render(self, name, value, attrs=None, renderer=None):
        
        wrapped = self.widget.render(name, value, attrs, renderer)
        checkbox_name = self.clear_checkbox_name(name)
        checkbox_id = self.clear_checkbox_id(checkbox_name)
        checkbox_label = self.clear_checkbox_label
        checkbox = self.checkbox.render(
            checkbox_name,
            value == self.empty_value,
            attrs={'id': checkbox_id},
            renderer=renderer)
        return mark_safe(self.template.format(
            conditional_escape(wrapped),
            conditional_escape(checkbox_id),
            conditional_escape(checkbox_label),
            conditional_escape(checkbox)))
55820
public function render()
    {
        $returnValue = $this->renderLabel();
        
        $returnValue .= "<select name='{$this->name}' id='{$this->name}' ";
        $returnValue .= $this->renderAttributes();
        $returnValue .= ">";
        if (! empty($this->emptyOption)) {
            $this->options = array_merge(array(
                ' ' => $this->emptyOption), $this->options);
        }
        foreach ($this->options as $optionId => $optionLabel) {
            $returnValue .= "<option value='{$optionId}' ";
            if ($this->value === $optionId) {
                $returnValue .= " selected='selected' ";
            }
            $returnValue .= ">" . _dh($optionLabel) . "</option>";
        }
        $returnValue .= "</select>";
        
        return (string) $returnValue;
    }
1297588
public function render()
    {
        $this->initPlainInput();

        $this->prepend('<i class="fa fa-pencil fa-fw"></i>')
            ->defaultAttribute('type', 'text')
            ->defaultAttribute('id', $this->id)
            ->defaultAttribute('name', $this->elementName ?: $this->formatName($this->column))
            ->defaultAttribute('value', old($this->column, $this->value()))
            ->defaultAttribute('class', 'form-control '.$this->getElementClassString())
            ->defaultAttribute('placeholder', $this->getPlaceholder());

        $this->addVariables([
            'prepend' => $this->prepend,
            'append'  => $this->append,
        ]);

        return parent::render();
    }
956522
protected function renderHeaderCellContent()
    {
        $name = rtrim($this->name, '[]') . '_all';
        $id = $this->grid->options['id'];
        $options = json_encode([
            'name' => $this->name,
            'multiple' => $this->multiple,
            'checkAll' => $name,
        ], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
        $this->grid->getView()->registerJs("jQuery('#$id').yiiGridView('setSelectionColumn', $options);");

        if ($this->header !== null || !$this->multiple) {
            return parent::renderHeaderCellContent();
        } else {
            return Checkbox::widget([
                'name' => $name,
                'checked' => false,
                'inputOptions' => [
                    'class' => 'select-on-check-all'
                ],
                'clientOptions' => [
                    'onChecked' => new JsExpression('function() {
                        var $childCheckbox = $(this).closest("#' . $this->grid->options['id'] . '").find("input[name=\'' . $this->name . '\']").closest(".checkbox");
                        $childCheckbox.checkbox("check");
                    }'),
                    'onUnchecked' => new JsExpression('function() {
                        var $childCheckbox = $(this).closest("#' . $this->grid->options['id'] . '").find("input[name=\'' . $this->name . '\']").closest(".checkbox");
                        $childCheckbox.checkbox("uncheck");
                    }')
                ]
            ]);
        }
    }
390082
protected function renderCheckboxes($checkboxes)
    {
        $markup = '';
        foreach ($checkboxes as $boxes) {
            $markup .= '<li class="disable-element">';
            if (is_array($boxes)) {
                if (isset($boxes['__all__'])) {
                    $markup .= $this->renderCheckbox($boxes['__all__'], 'disable-elements-toggle');
                    unset($boxes['__all__']);
                }

                $markup .= '<ul class="disable-elements">' . $this->renderCheckboxes($boxes) . '</ul>';
            } else {
                $markup .= $this->renderCheckbox($boxes);
            }
            $markup .= '</li>';
        }
        return $markup;
    }
647367
public function renderField()
    {
        list($name, $id) = $this->resolveNameID();

        echo CHtml::openTag($this->tagName, array('id' => 'wrapper-' . $id));

        if ($this->hasModel()) {
            echo CHtml::activeCheckBox($this->model, $this->attribute, $this->htmlOptions);
        } else {
            echo CHtml::checkBox($name, $this->value, $this->htmlOptions);
        }

        echo CHtml::closeTag($this->tagName);
    }
53691
public function render()
	{
		/** @var BootstrapRenderer $renderer */
		$renderer = $this->container->form->renderer;

		$element = $renderer->configElem(RendererConfig::gridRow, $this->elementPrototype);
		foreach ($this->cells as $cell) {
			$cellHtml = $cell->render();
			$element->addHtml($cellHtml);
		}

		return $element;
	}
1057994
public function render(): string
    {
        $view = $this->viewer->make($this->getView(), $this->getFormData());

        // Indicates that the form has been rendered at least once.
        // Then return its content.
        $this->rendered = true;

        return $view->render();
    }
1151783
public function render() {

		$result = NULL;

		foreach ($this->css as $name => $value) {

			if (!$value = trim($value)) {
				continue;
			}

			$result .= "{$name}:{$value};";
		}

		return $result ? $result : '';
	}