Add a badge to current item
@param string $label
@param string $colorOrStatus
@param string $toolTipLabel
@return $this
427490
public function badge($label, $colorOrStatus = null, $toolTipLabel = null) {
        switch (true) {
            case !isset($this->list[$this->listCount - 1]) : 
                Checkers::notice('Unable to put badge [' . $label . '] in list group, no element.');
                break;
            case $this->list[$this->listCount - 1] instanceof Button : 
                Checkers::notice('Unable to badge a list group button. Use an element instead.');
                break;
            case is_array($this->list[$this->listCount - 1]) : 
                $this->badges[$this->listCount - 1][] = $this->getBadgeHtml($label, $colorOrStatus, $toolTipLabel);
                break;
            default : 
                Checkers::notice('Unable to find what to do with your badge [' . $label . ']...');
        }
        return $this;
    }
8511
public function addSubMenu($label)
    {
        // we use MenuSeparator tag here just to put View_Popover outside of UL list.
        // Otherwise it breaks correct HTML and CSS.
        /** @type View_Popover $f */
        $f = $this->add('View_Popover');
        $this->addMenuItem($f->showJS('#'.$this->name.'_i'.count($this->items)), $label);

        return $f->add('Menu_jUI');
    }
1077945
public static function add($label, $urlCode = null, $addedArgs = array())
  {
    self::$items[] = new BreadcrumbItem($label, $urlCode, $addedArgs);
  }
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;
    }
533420
public function setLabel($label)
    {
        if (in_array(
            $label,
            $this->validLabels
        )) {
            $this->label = $label;
        }

        return $this;
    }
353932
public function badge($callbackOrValue = null, $className = null)
    {
        $badge = $this->container->make('Maatwebsite\Sidebar\Badge');

        if (is_callable($callbackOrValue)) {
            $this->call($callbackOrValue, $badge);
        } elseif ($callbackOrValue) {
            $badge->setValue($callbackOrValue);
        }

        if ($className) {
            $badge->setClass($className);
        }

        $this->addBadge($badge);

        return $badge;
    }
316115
public function onLabelCallback(array $row, $label, DataContainer $dc, $attributes)
    {
        /** @var Image $imageAdapter */
        $imageAdapter = $this->framework->getAdapter(Image::class);

        // Align the icon with the text
        if (false !== \stripos($attributes, 'style="')) {
            $attributes = \str_replace('style="', 'style="vertical-align:text-top;', $attributes);
        } else {
            $attributes .= \trim($attributes.' style="vertical-align:text-top;"');
        }

        return $imageAdapter->getHtml('iconPLAIN.svg', '', $attributes).' '.$label;
    }
310229
public function onLabelEdit(ResourceEvent $event)
    {
        $labelIdList    = $event->getResourceIdList();
        $labels         = $this->labelManager->loadLabels($labelIdList);
        $channelsToAdd  = [];
        $channelsToDel  = [];

        foreach ($labels as $label) {
            if (!$this->labelManager->isRootLabel($label)) {
                $channelsToAdd[] = 'label:' . $label->tid;
            } else {
                $channelsToDel[] = 'label:' . $label->tid;
            }
        }

        if (!empty($channelsToAdd)) {
            $this->notifService->getBackend()->createChannels($channelsToAdd, true);
        }
        if (!empty($channelsToDel)) {
            $this->notifService->getBackend()->deleteChannels($channelsToDel, true);
        }
    }
1173752
public function addLink(
            string $label, 
            string $url, 
            bool $active       = false, 
            bool $disabled     = false, 
            string $icon       = null, 
            string $iconColor  = null, 
            string $badge      = null, 
            string $badgeColor = null)
    {
        Checkers::checkUrl($url);
        $this->items[] = [
            'label'    => $label, 
            'url'      => $url, 
            'active'   => $active, 
            'disabled' => $disabled,
            'icon'     => $icon,
            'icolor'   => $iconColor,
            'badge'    => $badge,
            'bcolor'   => $badgeColor
        ];
        return $this;
    }
704690
protected static function tooltipPopover($label, $url, $title, $htmlOptions)
    {
        $htmlOptions['title'] = $title;
        if (TbArray::popValue('animation', $htmlOptions)) {
            $htmlOptions['data-animation'] = 'true';
        }
        if (TbArray::popValue('html', $htmlOptions)) {
            $htmlOptions['data-html'] = 'true';
        }
        $selector = TbArray::popValue('selector', $htmlOptions);
        if (!empty($selector)) {
            $htmlOptions['data-selector'] = $selector;
        }
        $placement = TbArray::popValue('placement', $htmlOptions);
        if (!empty($placement)) {
            $htmlOptions['data-placement'] = $placement;
        }
        $trigger = TbArray::popValue('trigger', $htmlOptions);
        if (!empty($trigger)) {
            $htmlOptions['data-trigger'] = $trigger;
        }
        if (($delay = TbArray::popValue('delay', $htmlOptions)) !== null) {
            $htmlOptions['data-delay'] = $delay;
        }
        return self::link($label, $url, $htmlOptions);
    }
61748
public function addLabel($label, $before=false, $icon=NULL) {
		$this->tagName="div";$prefix="";
		if($before)
			$prefix="left ";
		$this->addToProperty("class", $prefix."labeled");
		$isIcon=(isset($this->content[0]) && $this->content[0] instanceof HtmlIcon);
		$this->content=new HtmlButton("button-" . $this->identifier, $this->content);
		if($isIcon){
			$this->content->addClass("icon");
		}
		$this->content->setTagName("div");
		$label=new HtmlLabel("label-" . $this->identifier, $label, $icon,"a");
		$label->setBasic();
		$this->addContent($label, $before);
		return $label;
	}
298886
protected function addLabel($dimension, $label)
    {
        if (!in_array($dimension, array(self::DIMENSION_X, self::DIMENSION_Y))) {
            throw new \InvalidArgumentException(sprintf("Value '%s' is not a valid dimension", $dimension));
        }

        $this->axis[$dimension][] = $label;
    }
237576
public static InsnList addLabel(LabelNode labelNode) {
        Validate.notNull(labelNode);

        InsnList ret = new InsnList();
        ret.add(labelNode);

        return ret;
    }
178013
public function addLabelDate($name, $label = '')
    {
        $e = new \FrenchFrogs\Form\Element\LabelDate($name, $label);
        $this->addElement($e);

        return $e;
    }
899317
public function setLabel($label) : self
    {
        $index = $this->getIndex($this->label);

        if (!$label instanceof Label && !$label instanceof HtmlElement) {
            $label = new Label($label);
        }

        $this->label = $label;

        if (is_null($index)) {
            array_unshift($this->elements, $label);
        } else {
            $this->elements[$index] = $label;
        }

        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);
        }
    }
709771
public static function badge($label, $htmlOptions = array())
    {
        self::addCssClass('badge', $htmlOptions);
        $color = TbArray::popValue('color', $htmlOptions);
        if (!empty($color)) {
            self::addCssClass('badge-' . $color, $htmlOptions);
        }
        return self::tag('span', $htmlOptions, $label);
    }