Set Header Label

@param string $label

@return $this
961941
function setLabel($label)
    {
        // normalize header label
        $label = str_replace(' ', '-', ucwords(str_replace(['_', '-'], ' ', (string) $label)));

        if (! isValidLabel($label) )
            throw new \InvalidArgumentException(sprintf(
                'Invalid header name "%s".'
                , is_null($label) ? 'null' : $label
            ));


        $this->label = $label;
        return $this;
    }
178620
public function setLabel( $label ) {
		$this->labelValue = (string)$label !== '' ? $label : null;

		$this->label->clearContent();
		if ( $this->labelValue !== null ) {
			if ( is_string( $this->labelValue ) && trim( $this->labelValue ) === '' ) {
				$this->label->appendContent( new HtmlSnippet( '&nbsp;' ) );
			} else {
				$this->label->appendContent( $label );
			}
		}

		$visibleLabel = $this->labelValue !== null && !$this->invisibleLabel;
		$this->toggleClasses( [ 'oo-ui-labelElement' ], $visibleLabel );

		return $this;
	}
1140532
public function setLabel($controller, $action, $label)
    {
        $key = $this->_getKey($controller, $action);

        $this->altLabels[$key] = $label;

        return $this;
    }
1036856
public function withMetadata(string $name, string $label)
    {
        $this->contentGroup->metadata[$name] = ['name' => $name, 'label' => $label, 'order' => $this->order++];

        return $this;
    }
857759
public function label($label)
    {
        if (is_array($label)) {
            $this->label = array_merge($this->label, $label);
        } else {
            $this->label[$this->dateBindRule[count($this->dateBindRule) - 1]['field'][0]] = $label;
        }

        return $this;
    }
154849
public function setLabels(array $labels): TaxonomyInterface
    {
        if (isset($this->args['labels'])) {
            $this->args['labels'] = array_merge($this->args['labels'], $labels);
        } else {
            $this->args['labels'] = $labels;
        }

        return $this;
    }
933243
public function addParticipatePage($label)
    {
        $participate = $this->addContainer($label);
        $subscr = $participate->addPage($this->_('Subscribe'), 'pr.participate.subscribe', 'participate', 'subscribe');
        $subscr->addPage(null, 'pr.participate.subscribe', 'participate', 'subscribe-thanks');
        $unsub = $participate->addPage($this->_('Unsubscribe'), 'pr.participate.unsubscribe', 'participate', 'unsubscribe');
        $unsub->addPage(null, 'pr.participate.unsubscribe', 'participate', 'unsubscribe-thanks');

        return $participate;
    }
1364863
public function addCurrentParent($label = null)
    {
        $parent = $this->menu->getCurrentParent();

        if ($parent && (! $parent->isTopLevel())) {
            $this->addMenuItem($parent, $label);
        }
        return $this;
    }
811088
public function addCustomHeader($header)
    {
        self::$headers[self::CUSTOM_HEADERS][] = $this->normalizeHeaderName($header);
        return $this;
    }
1184970
public function labelledByCallback(callable $labelCallback)
    {
        $this->updateOptions(function (ObjectIdentityOptions $options) use ($labelCallback) {
            return $options->withLabelCallback($labelCallback);
        });

        return $this;
    }
630145
public function setLabel($label)
    {
        if (Format::isString256($label) === true) {
            $this->label = $label;
        } else {
            $msg = "The label argument must be a string with at most 256 characters.";
            throw new InvalidArgumentException($msg);
        }
    }
1185620
public function label($label)
    {
        if ($label === false) {
            $this->parts['{label}'] = '';
        } else {
            $this->parts['{label}'] = $label;
        }
        
        return $this;
    }
813146
public static function menuHeader($label, $htmlOptions = array())
    {
        self::addCssClass('dropdown-header', $htmlOptions);
        return self::tag('li', $htmlOptions, $label);
    }
637180
public function labels($labels)
    {
        if ($labels instanceof Collection) {
            $labels = $labels->toArray();
        }

        $this->labels = $labels;

        return $this;
    }
1270373
public function setToggle($label)
    {
        if ($label instanceof Button) {
            $this->toggle = $label;
        } else {
            $this->toggle = new Button($label);
            $this->entity->setEntityName($label);
        }

        $this->toggle->attributes->addAttribute('data-toggle', 'dropdown');
        $this->toggle->attributes->addAttribute('aria-haspopup', true);
        $this->toggle->attributes->addAttribute('aria-expanded', false);
        $this->toggle->attributes->addAttributeClass('dropdown-toggle');

        return $this;
    }
560267
public function labels(array $labels)
    {
        foreach ($labels as $field => $label)
        {
            $this->label($field, $label);
        }

        return $this;
    }
1267338
protected function getOrCreateTag($label)
    {
        if (isset($this->tagFirstLevelCache[$label])) {
            return $this->tagFirstLevelCache[$label];
        }

        $tag = $this->tagRepository->findOneByLabel($label);

        if ($tag === null) {
            $tag = new Tag($label);
            $this->tagRepository->add($tag);
        }

        $this->tagFirstLevelCache[$label] = $tag;

        return $tag;
    }