Bootstrap\View\Helper\BootstrapHtmlHelper::label PHP Method

label() public method

Create a Twitter Bootstrap span label.
public label ( $text, $type = null, $options = [] )
    public function label($text, $type = null, $options = [])
    {
        if (is_string($type)) {
            $options['type'] = $type;
        } else {
            if (is_array($type)) {
                $options = $type;
            }
        }
        $options += ['type' => $this->config('label.type')];
        $type = $options['type'];
        unset($options['type']);
        $options = $this->addClass($options, 'label');
        $options = $this->addClass($options, 'label-' . $type);
        return $this->tag('span', $text, $options);
    }