Adds a label to the group.

@param Doozr_Form_Service_Component_Interface_Html $label The label instance to add

@author Benjamin Carl <opensource@clickalicious.de>

@return int The index of the added label
961913
public function addLabel(Doozr_Form_Service_Component_Interface_Html $label)
    {
        $index               = $this->addChild($label);
        $this->index[$index] = self::LABEL;

        (!isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] = [] : null;
        $this->indexReverse[self::LABEL][]                                            = $index;

        return $index;
    }
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;
    }
237576
public static InsnList addLabel(LabelNode labelNode) {
        Validate.notNull(labelNode);

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

        return ret;
    }
306518
public function addLabel($name, $label = '', $attr = [] )
    {
        $e = new \FrenchFrogs\Form\Element\Label($name, $label, $attr);
        $this->addElement($e);
        return $e;
    }
993049
public function addButton($label, $options = array())
    {
        $position = 'after';
        if (is_string($options)) {
            $position = $options;
        } else {
            if (isset($options['position'])) {
                $position = $options['position'];
            }
        }
        if ($position == 'after') {
            /** @type Button $button */
            $button = $this->afterField()->add('Button', $options);
            $button->set($label);
        } else {
            /** @type Button $button */
            $button = $this->beforeField()->add('Button', $options);
            $button->set($label);
        }
        $this->js('change', $button->js()->data('val', $this->js()->val()));

        return $button;
    }
236896
public function setLabel($label, $domain = null)
    {
        $this->label = $label;
        $this->setDomain($domain);

        return $this;
    }
1291124
public function hasLabel($label)
    {
        if (null !== $label) {
            $l = (string) $label;
            if ($this->labels->contains($l)) {
                return true;
            }
        }

        return false;
    }
1261099
public function label(Form\Element\Label $element)
    {
        $html = '<label class="col-md-3 control-label">' . $element->getLabel() . '</label>';
        $html .= '<div class="col-md-9"><p class="form-control-static">' . $element->getValue() . '</p></div>';

        $class =  Style::FORM_GROUP_CLASS . ' row';
        return html('div', compact('class'), $html);
    }
1199137
public function addOption($value, $label = ''): int
    {
        $this->options[] = [$value, $label];

        $res = $this->options_position;
        $this->options_position++;

        return $res;
    }
432041
public function addonButton($label, $options = [])
    {
        $attributes = array_merge(['class' => 'btn', 'type' => 'button'], $options);

        if (isset($options['class'])) {
            $attributes['class'] .= ' btn';
        }

        return '<div class="input-group-btn"><button ' . $this->html->attributes($attributes) . '>'.$label.'</button></div>';
    }
533420
public function setLabel($label)
    {
        if (in_array(
            $label,
            $this->validLabels
        )) {
            $this->label = $label;
        }

        return $this;
    }
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;
    }
496154
protected function checkLabel($label)
    {
        if ($label instanceof ElementInterface) {
            return $label;
        }

        return $this->createLabel($this->translate($label));
    }
611339
public function setLabel(string $label = ''): \RolesCapabilities\Capability
    {
        $this->label = '' !== trim($label) ? $label : ucwords(str_replace('_', ' ', $this->name));

        return $this;
    }
480144
public function append($label): self
    {
        $label = $this->filterComponent($label);
        if (null === $label) {
            return $this;
        }

        return new self($this->getContent().self::SEPARATOR.$label);
    }
916654
public function setLabel($label)
    {
        parent::setLabel($label);
        if (isset($this->token['captcha'])) {
            if ((strpos($this->token['captcha'], '<img') === false) &&
                ((strpos($this->token['captcha'], ' + ') !== false) ||
                 (strpos($this->token['captcha'], ' - ') !== false) ||
                 (strpos($this->token['captcha'], ' * ') !== false) ||
                 (strpos($this->token['captcha'], ' / ') !== false))) {
                $this->label = $this->label . '(' .
                    str_replace([' * ', ' / '], [' &#215; ', ' &#247; '], $this->token['captcha'] .')');
            } else {
                $this->label = $this->label . $this->token['captcha'];
            }
        }
        return $this;
    }
143169
public void addLabel(Label label) {
        assertNotNull(label);
        labels.add(label);
        label.setParent(this);
    }