src/View/Helper/HtmlHelper.php
public function label($text, $type = null, $options = []) {
        if (is_string($type)) {
            $options['type'] = $type;
        }
        else if (is_array($type)) {
            $options = $type;
        }
        $options += $this->getConfig('label') + [
            'templateVars' => []
        ];
        $type = $options['type'];
        return $this->formatTemplate('label', [
            'type' => $options['type'],
            'content' => $text,
            'attrs' => $this->templater()->formatAttributes($options, ['type']),
            'templateVars' => $options['templateVars']
        ]);
    }
public function label($text, $type = null, $options = []) {
        if (is_string($type)) {
            $options['type'] = $type;
        }
        else if (is_array($type)) {
            $options = $type;
        }
        $options += $this->getConfig('label') + [
            'templateVars' => []
        ];
        $type = $options['type'];
        return $this->formatTemplate('label', [
            'type' => $options['type'],
            'content' => $text,
            'attrs' => $this->templater()->formatAttributes($options, ['type']),
            'templateVars' => $options['templateVars']
        ]);
    }
public function label ( $ text , $ type = null , $ options = [ ] ) { if ( is_string ( $ type ) ) { $ options [ 'type' ] = $ type ; } else if ( is_array ( $ type ) ) { $ options = $ type ; } $ options += $ this -> getConfig ( 'label' ) + [ 'templateVars' => [ ] ] ; $ type = $ options [ 'type' ] ; return $ this -> formatTemplate ( 'label' , [ 'type' => $ options [ 'type' ] , 'content' => $ text , 'attrs' => $ this -> templater ( ) -> formatAttributes ( $ options , [ 'type' ] ) , 'templateVars' => $ options [ 'templateVars' ] ] ) ; }
Create a Twitter Bootstrap span label.

The second parameter may either be `$type` or `$options` (in which case
the third parameter is not used, and the label type can be specified in the
`$options` array).

### Options

- `tag` The HTML tag to use.
- `type` The type of the label.
- `templateVars` Provide template variables for the `label` template.
- Other attributes will be assigned to the wrapper element.

@param string $text The label text
@param string|array $type The label type (default, primary, success, warning,
info, danger) or the array of options (see `$options`).
@param array $options Array of options. See above. Default values are retrieved
from the configuration.

@return string The HTML label element.
Create a Twitter Bootstrap span label .