Create a form label element.

@param  string $name
@param  string $value
@param  array  $options
@param  bool   $escape_html

@return \Illuminate\Support\HtmlString
173121
public function label($name, $value = null, $options = [], $escape_html = true)
    {
        $this->labels[] = $name;

        $options = $this->html->attributes($options);

        $value = $this->formatLabel($name, $value);

        if ($escape_html) {
            $value = $this->html->entities($value);
        }

        return $this->toHtmlString('<label for="' . $name . '"' . $options . '>' . $value . '</label>');
    }
1167322
public DynaFormLabel addLabel(final String value, final boolean escape, final int colspan, final int rowspan) {
        final DynaFormLabel dynaFormLabel = new DynaFormLabel(value, escape, colspan, rowspan, row, elements.size() + 1, extended);

        elements.add(dynaFormLabel);
        dynaFormModel.getLabels().add(dynaFormLabel);
        totalColspan = totalColspan + colspan;

        return dynaFormLabel;
    }
1081721
private function setFormFieldLabel($name, $options)
    {
        if (isset($options['label']) && $options['label'] != false) {
            $label = isset($options['label']) ? $options['label'] : $this->formatFieldLabel($name);

            return FormFacade::label($name, $label, ['class' => 'form-label']).'&nbsp;';
        } elseif (!isset($options['label'])) {
            return FormFacade::label($name, $this->formatFieldLabel($name), ['class' => 'form-label']).'&nbsp;';
        }
    }
900616
public static function searchQueryField($name, $value = '', $htmlOptions = array())
    {
        self::addCssClass('search-query', $htmlOptions);
        return self::textField($name, $value, $htmlOptions);
    }
912878
public function checkbox(
        $name,
        $value = 1,
        $checked = null,
        $options = []
    ) {
        $checkable = parent::checkbox($name, $value, $checked, $options);

        return array_key_exists('label', $options) ?
            $this->wrapCheckable($options['label'], 'checkbox', $checkable) :
            $checkable;
    }
284210
public function setAttribute(string $name, string $value) : Label
    {
        $this->tag->setAttribute($name, $value);

        return $this;
    }
96684
public function field($name, $value, $options = [])
    {
        $value = Dumper::export($value);
        $before = Arr::get($options, 'before', '');
        $visibility = Arr::get($options, 'visibility', 'protected');
        $after = Arr::get($options, 'after', "\n");

        return "$before\t$visibility \$$name = $value;$after";
    }
1253091
private static function getHtmlAttribute(string $name, $value): string
    {
        if (!self::isset($value)) {
            return '';
        }

        if ($value === true) {
            return $name;
        }

        if (is_array($value)) {
            $value = self::convertAttributeArrayValue($name, $value);
        }

        return sprintf('%s="%s"', $name, static::escape((string) $value));
    }
158492
public function htmlLabel($control, $options = ['class' => 'form-block__name'])
    {
        $this->labels[] = $control->name;
        $value          = e($this->formatLabel($control->name, $control->label));
        $tip            = isset($control->tip) ? tooltip($control->name, $control->tip) : '';
        return '<label for="' . $control->name . '"' . $this->html->attributes($options) . '>' . $value . $tip . '</label>';
    }
416396
protected function renderStatic($name, $value, $options)
    {
        $options['tabindex'] = self::TABINDEX;

        if ($this->renderer->isBootstrapTheme()) {
            Html::addCssClass($options, 'form-control-static');
        }

        return Html::tag('p', $value, $options);
    }
303191
protected function validateOptions($name, $value, $options)
    {
        if (!in_array($value, $options)) {
            throw new \Exception(
                $name . ' must be one of: ' . implode(', ', $options)
            );
        }
    }
1305120
public function hiddenInput($name, $value = null, $htmlOptions = array())
    {
        return $this->input($name, 'hidden', $value, $htmlOptions);
    }
1091156
public static function textAreaControlGroup($name, $value = '', $htmlOptions = array())
    {
        return self::controlGroup(self::INPUT_TYPE_TEXTAREA, $name, $value, $htmlOptions);
    }
819986
public function appendAttribute($name, $value, $option = TRUE)
	{
		if (is_array($value)) {
			$prev = isset($this->attrs[$name]) ? (array)$this->attrs[$name] : [];
			$this->attrs[$name] = $value + $prev;

		} elseif ((string)$value === '') {
			$tmp = &$this->attrs[$name]; // appending empty value? -> ignore, but ensure it exists

		} elseif (!isset($this->attrs[$name]) || is_array($this->attrs[$name])) { // needs array
			$this->attrs[$name][$value] = $option;

		} else {
			$this->attrs[$name] = [$this->attrs[$name] => TRUE, $value => $option];
		}

		return $this;
	}
593522
public function contentTag($name, $content, array $options = array(), $escape = false)
    {
        if ($content instanceof \Closure) {
            ob_start();
            $ret     = $content();
            $content = ob_get_clean();
            if ($ret !== null) {
                $content = $ret;
            }
        }
        return $this->contentTagString($name, $content, $options, $escape);
    }
1351927
public static function combo($name, array $options, $value = null, array $attributes = array())
    {
        $input = self::setAttr($attributes, '<select{{attr}}>', $name, 'select');

        foreach ($options as $key => $val) {
            $input .= '<option value="' . self::entities($val) . '"';

            if ($value === $val) {
                $input .= ' selected';
            }

            $input .= '>' . $key . '</option>';
        }

        return $input . '</select>';
    }
957068
public function textarea($name, $value = '', $options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $name;
        }

        $options['name'] = $name;

        return '<textarea'.$this->attributes($options).'>'.$value.'</textarea>';
    }