Returns the label tag associated to the field or null if none.

@return \DOMElement|null
187487
public function getLabel()
    {
        $xpath = new \DOMXPath($this->node->ownerDocument);

        if ($this->node->hasAttribute('id')) {
            $labels = $xpath->query(sprintf('descendant::label[@for="%s"]', $this->node->getAttribute('id')));
            if ($labels->length > 0) {
                return $labels->item(0);
            }
        }

        $labels = $xpath->query('ancestor::label[1]', $this->node);
        if ($labels->length > 0) {
            return $labels->item(0);
        }
    }
976713
public function label()
    {
        if (!$this->label) {
            return;
        }

        $label = new HTMLBrick('label', $this->label);
        $label->addClass('col-lg-2');
        $label->addClass('control-label');

        return $label;
    }
250098
function () {
            var cfg = this._cfg, showLabel = (!cfg.hideLabel && !!cfg.label);
            if (showLabel) {
                var dom = this.getDom();
                if (this._isIE7OrLess) {
                    dom = dom ? dom.firstChild : null;
                }
                var elems = ariaUtilsDom.getDomElementsChildByTagName(dom, 'label');
                if (elems) {
                    if (elems.length === 0) {
                        this.$logError(this.WIDGET_INPUT_NO_LABEL, []);
                    } else if (elems.length == 1) {
                        return elems[0];
                    } else {
                        this.$logError(this.WIDGET_INPUT_TOO_MANY_LABELS, []);
                    }
                }
            }
            return null;
        }
580141
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->source)));
    }
569957
public function getDOMDocument()
    {
        $node = $this->getNode(0);
        $r = null;
        if ($node instanceof \DOMElement
            && $node->ownerDocument instanceof \DOMDocument
        ) {
            $r = $node->ownerDocument;
        }
        return $r;
    }
66777
public function getLabel() {
        if ($this->label) {
            return $this->translate($this->label);
        }
        $labels = array();
        if ($this->form->model && is_string($this->form->model)) {
            $class = $this->form->model;
            $labels = $class::getLabels();
        } elseif ($this->form->model && is_object($this->form->model)) {
            $class = get_class($this->form->model);
            $labels = $class::getLabels();
        }
        if (isset($labels[$this->name])) {
            return $this->translate($labels[$this->name]);
        }
        return $this->translate(ucwords(str_replace('_', ' ', $this->name)));
    }
994548
protected function getInputTag()
    {
        $tag = parent::getInputTag();

        if ($this->name !== null) {
            $tag->name = $this->name;
        }

        return $tag;
    }
314287
public function getLabel() {
        $label = $this->label;
        if ($this->label === CINBarcode1D::AUTO_LABEL) {
            $label = '';
        }

        return $label;
    }
486464
public function getLabel()
    {
        if (!$this->entryFormatter) {
            $this->entryFormatter = Application::getFacadeApplication()->make(EntryFormatterInterface::class);
        }

        if ($mask = $this->getEntity()->getLabelMask()) {
            $name = $this->entryFormatter->format($mask, $this);
        }

        if (!$name) {
            $name = $this->entryFormatter->getLabel($this);
        }

        return $name;
    }
470013
public function getIsActiveLabelAttribute()
    {
        $title = 'Not Active';
        $class = 'danger';

        $from = Carbon::parse($this->active_from);
        $to = Carbon::parse($this->active_to);

        if (!$this->active_to || Carbon::now()->diffInMinutes($to, false) > 0) {
            if (Carbon::now()->diffInMinutes($from, false) < 0) {
                $title = 'Active';
                $class = 'success';
            }
        }

        return "<span class='label label-{$class}'>{$title}</span>";
    }
829325
public function getTitle()
    {
        $t = $this->dom->getElementsByTagName('title')->item(0);
        if ($t == null) {
            return null;
        } else {
            return $t->nodeValue;
        }
    }
427101
public function getExampleFormMarkup()
    {
        $label = Widget::Label($this->get('label'));
        $label->appendChild(Widget::Textarea('fields['.$this->get('element_name').']', (int)$this->get('size'), 50));

        return $label;
    }
1005079
protected function getInputTag()
    {
        $input = new SwatHtmlTag('input');
        $input->type = 'hidden';
        // initial value is blank, value is set by JavaScript
        $input->value = '';
        $input->id = $this->id . '_input';

        return $input;
    }
566106
public function getLabel()
    {
        $label = false;
        if (isset($this->options['label_callback'])
            && is_callable($this->options['label_callback'])) {
            $label = call_user_func($this->options['label_callback']);
        }

        if (!$label) {
            $label = isset($this->options['label']) ? $this->options['label'] : null;
        }

        return $label;
    }
511252
protected function getTitle()
	{
		$title = '';

		if ($this->hidden)
		{
			return $title;
		}

		// Get the label text from the XML element, defaulting to the element name.
		$title = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
		$title = $this->translateLabel ? Text::_($title) : $title;

		return $title;
	}
441152
protected function getLabel()
	{
		if (isset($this->labelOptions['class'])) {
			$this->labelOptions['class'] .= ' control-label';
		} else {
			$this->labelOptions['class'] = 'control-label';
		}

		if (isset($this->htmlOptions['id'])) {
			$this->labelOptions['for'] = $this->htmlOptions['id'];
		}

		return parent::getLabel();
	}
927365
public function getFieldLabel($fieldName)
    {
        $result = $this->getField($fieldName, 'label_'.$this->locale, $this->getField($fieldName, 'label'));

        if ($result === null && array_key_exists($fieldName, $this->standardFieldLabels)) {
            $result = $this->standardFieldLabels[$fieldName];
        }

        if ($result === null) {
            $result = $fieldName;
        }

        return $result;
    }