Returns HTML code for a label for this form control te be inserted before the HTML code of this form control.

@return string

@since 1.0.0
@api
324205
protected function getHtmlPrefixLabel(): string
  {
    // If a label must be generated make sure the form control and the label have matching 'id' and 'for' attributes.
    if (isset($this->labelPosition))
    {
      if (!isset($this->attributes['id']))
      {
        $id                           = Html::getAutoId();
        $this->attributes['id']       = $id;
        $this->labelAttributes['for'] = $id;
      }
      else
      {
        $this->labelAttributes['for'] = $this->attributes['id'];
      }
    }

    // Generate a prefix label, if required.
    if ($this->labelPosition=='pre')
    {
      $ret = $this->getHtmlLabel();
    }
    else
    {
      $ret = '';
    }

    return $ret;
  }
400484
public function getLabel()
    {
        if ($this->model->label != "") {
            return $this->model->label;
        }

        return StringTools::wordifyStringByUpperCase($this->getName());
    }
501822
public function getHtml(): string
  {
    $html = $this->prefix;
    $html .= Html::generateTag('span', $this->attributes);

    if (is_array($this->options))
    {
      // Normalize current value as a string.
      $valueAsString = Cast::toManString($this->value, '');

      foreach ($this->options as $option)
      {
        $inputAttributes = $this->inputAttributes($option);
        $labelAttributes = $this->labelAttributes($option);

        $labelAttributes['for'] = $inputAttributes['id'];

        $key         = $option[$this->keyKey];
        $keyAsString = Cast::toManString($key, '');
        $value       = ($this->optionsObfuscator) ? $this->optionsObfuscator->encode(Cast::toOptInt($key)) : $key;

        $inputAttributes['value']   = $value;
        $inputAttributes['checked'] = ($valueAsString===$keyAsString);

        $html .= Html::generateVoidElement('input', $inputAttributes);

        $html .= $this->labelPrefix;
        $html .= Html::generateElement('label',
                                       $labelAttributes,
                                       Cast::toOptString($option[$this->labelKey]),
                                       $this->labelIsHtml);
        $html .= $this->labelPostfix;
      }
    }

    $html .= '</span>';
    $html .= $this->postfix;

    return $html;
  }
1302098
public function label() {
		$output = null;
		if ( isset( $this->struct['label'] ) ) {
			$output .= '<label for="' . esc_attr( $this->id() ) . '-control"><span class="uix-control-label">' . esc_html( $this->struct['label'] ) . '</span></label>';
		}

		return $output;
	}
1241864
public function getAsLabel()
    {
        // Remove first part since that part equals the page
        $key = substr($this->key, strpos($this->key, '.')+1);

        $label = str_replace('.', ' ', $key);

        return ucfirst($label);
    }
1244505
public function getHtml(): string
  {
    $html = $this->prefix;
    $html .= $this->value;
    $html .= $this->postfix;

    return $html;
  }
524967
protected function getLabelHelper()
    {
        if ($this->labelHelper) {
            return $this->labelHelper;
        }

        if (method_exists($this->view, 'plugin')) {
            $this->labelHelper = $this->view->plugin('form_label');
        }

        if (!$this->labelHelper instanceof FormLabel) {
            $this->labelHelper = new FormLabel();
        }

        if ($this->hasTranslator()) {
            $this->labelHelper->setTranslator(
                $this->getTranslator(),
                $this->getTranslatorTextDomain()
            );
        }

        return $this->labelHelper;
    }
27480
public function GridLabelClass() {
        return (trim($this->gridLabelClass)!='')?$this->gridLabelClass:$this->owner->form->gridLabelClass;
    }
974046
public function getLabel() : ?string 
    {
        if ( ! $this->hasLabel()) {
            $this->setLabel($this->getDefaultLabel());
        }
        return $this->label;
    }
471418
public function getLabel()
	{
		if ($this->label === null) {
			return Str::title($this->getName());
		}

		return $this->label;
	}
1214294
public function label()
    {
        if ($this->label_translated) {
            return cms_trans($this->label_translated);
        }

        if ($this->label) {
            return $this->label;
        }

        return ucfirst(str_replace('_', ' ', snake_case($this->key)));
    }
1113160
public function renderLabel(Nette\Forms\IControl $control)
	{
		/** @noinspection PhpUndefinedMethodInspection */
		$controlLabel = $control->getLabel();
		if ($controlLabel instanceof Html && $controlLabel->getName() == 'label') {
			// the control has already provided us with the element, no need to create our own
			$controlLabel = $this->configElem(Cnf::label, $controlLabel);
			// just configure it to suit our needs

			$labelHtml = $controlLabel;
		} elseif ($controlLabel === NULL) {
			return Html::el();
		} else {
			// the control doesn't give us <label>, se we'll create our own
			$labelHtml = $this->getElem(Cnf::label);
			if ($controlLabel) {
				$labelHtml->setHtml($controlLabel);
			}
		}

		return $labelHtml;
	}
412638
public function getHtml(): string
  {
    $this->attributes['name'] = $this->submitName;

    $html = $this->prefix;
    $html .= $this->getHtmlPrefixLabel();
    $html .= Html::generateElement('textarea', $this->attributes, Cast::toOptString($this->value));
    $html .= $this->getHtmlPostfixLabel();
    $html .= $this->postfix;

    return $html;
  }
550331
public function RenderControl () {
		$attrsStr = $this->renderControlAttrsWithFieldVars([
			'autoComplete',
		]);
		if (!$this->form->GetFormTagRenderingStatus()) 
			$attrsStr .= (strlen($attrsStr) > 0 ? ' ' : '')
				. 'form="' . $this->form->GetId() . '"';
		$formViewClass = $this->form->GetViewClass();
		return $formViewClass::Format(static::$templates->control, [
			'id'		=> $this->id,
			'name'		=> $this->name,
			'type'		=> $this->type,
			'value'		=> htmlspecialchars($this->value, ENT_QUOTES),
			'attrs'		=> strlen($attrsStr) > 0 ? ' ' . $attrsStr : '',
		]);
	}
1292895
public function render()
    {
        $returnValue = (string) '';
        
        // custom label rendering
        if (! isset($this->attributes['noLabel'])) {
            $returnValue .= "<label class='form_desc' for='{$this->name}'>" . _dh($this->getDescription()) . (strlen($this->value) == 0 ? '' : ' (change)') . "</label>";
        } else {
            unset($this->attributes['noLabel']);
        }
        $returnValue .= "<input type='password' name='{$this->name}[]' id='{$this->name}' ";
        $returnValue .= $this->renderAttributes();
        $returnValue .= ' value=""  /><br /><br />';
        $returnValue .= "<label class='form_desc'></label>";
        $returnValue .= "<input type='password' name='{$this->name}[]' id='{$this->name}' ";
        $returnValue .= $this->renderAttributes();
        $returnValue .= ' value=""  />';
        
        return (string) $returnValue;
    }
1236477
public function get_label() {
        if (!isset($this->grade->label)) {
            $this->grade->label = '';
        }
        return $this->grade->label;
    }
99845
public String getHtmlCode()
	{
		Object[] _params =
		{
				getHtmlCodeForNameAttribute(),
				getHtmlCodeForIdAttribute(),
				HtmlUtils.generateAttribute(HtmlUtils.AttributeNames.VALUE, getValue()),
				isSelected() ? HtmlUtils.SpecialAttribute.CHECKED : HtmlUtils.SpecialAttribute.NONE,
				isDisabled() ? HtmlUtils.SpecialAttribute.DISABLED : HtmlUtils.SpecialAttribute.NONE,
				HtmlUtils.generateAttribute(HtmlUtils.AttributeNames.Form.FOR, getId()),
				getLabel()

		};
		return FORMAT_RADIO_BUTTON.format(_params);
	}