public function label($text, array $options = [])
    {
        $options = optionsParser($options);
        $options->append('class', sprintf('label label-%s', $options->consume('type') ?: 'default'));

        return self::tag('span', $text, $options->toArray());
    }
public function label($text, array $options = [])
    {
        $options = optionsParser($options);
        $options->append('class', sprintf('label label-%s', $options->consume('type') ?: 'default'));

        return self::tag('span', $text, $options->toArray());
    }
public function label ( $ text , array $ options = [ ] ) { $ options = optionsParser ( $ options ) ; $ options -> append ( 'class' , sprintf ( 'label label-%s' , $ options -> consume ( 'type' ) ? : 'default' ) ) ; return self :: tag ( 'span' , $ text , $ options -> toArray ( ) ) ; }
Create a label, according to the Bootstrap component.

This method creates only a label element. Not to be confused with the
`label()` method provided by `Formhelper`, which creates a label
for a form input.

You can set the type of label using the `type` option.
The values supported by Bootstrap are: `default`, `primary`, `success`,
`info`, `warning` and `danger`.
@param string $text Label text
@param array $options HTML attributes of the list tag
@return string
@see http://getbootstrap.com/components/#labels Bootstrap documentation
@uses tag()
Create a label according to the Bootstrap component .