src/View/Helper/HtmlHelper.php
public function badge($text, $options = []) {
        $options += [
            'templateVars' => []
        ];
        return $this->formatTemplate('badge', [
            'content' => $text,
            'attrs' => $this->templater()->formatAttributes($options),
            'templateVars' => $options['templateVars']
        ]);
    }
public function badge($text, $options = []) {
        $options += [
            'templateVars' => []
        ];
        return $this->formatTemplate('badge', [
            'content' => $text,
            'attrs' => $this->templater()->formatAttributes($options),
            'templateVars' => $options['templateVars']
        ]);
    }
public function badge ( $ text , $ options = [ ] ) { $ options += [ 'templateVars' => [ ] ] ; return $ this -> formatTemplate ( 'badge' , [ 'content' => $ text , 'attrs' => $ this -> templater ( ) -> formatAttributes ( $ options ) , 'templateVars' => $ options [ 'templateVars' ] ] ) ; }
Create a Twitter Bootstrap badge.

### Options

- `templateVars` Provide template variables for the `badge` template.
- Other attributes will be assigned to the wrapper element.

@param string $text The badge text.

@param array $options Array of attributes for the span element.
Create a Twitter Bootstrap badge .