Helper/Bootstrap/ListGroup.php
public function badge($label, $colorOrStatus = null, $toolTipLabel = null) {
        switch (true) {
            case !isset($this->list[$this->listCount - 1]) : 
                Checkers::notice('Unable to put badge [' . $label . '] in list group, no element.');
                break;
            case $this->list[$this->listCount - 1] instanceof Button : 
                Checkers::notice('Unable to badge a list group button. Use an element instead.');
                break;
            case is_array($this->list[$this->listCount - 1]) : 
                $this->badges[$this->listCount - 1][] = $this->getBadgeHtml($label, $colorOrStatus, $toolTipLabel);
                break;
            default : 
                Checkers::notice('Unable to find what to do with your badge [' . $label . ']...');
        }
        return $this;
    }
public function badge($label, $colorOrStatus = null, $toolTipLabel = null) {
        switch (true) {
            case !isset($this->list[$this->listCount - 1]) : 
                Checkers::notice('Unable to put badge [' . $label . '] in list group, no element.');
                break;
            case $this->list[$this->listCount - 1] instanceof Button : 
                Checkers::notice('Unable to badge a list group button. Use an element instead.');
                break;
            case is_array($this->list[$this->listCount - 1]) : 
                $this->badges[$this->listCount - 1][] = $this->getBadgeHtml($label, $colorOrStatus, $toolTipLabel);
                break;
            default : 
                Checkers::notice('Unable to find what to do with your badge [' . $label . ']...');
        }
        return $this;
    }
public function badge ( $ label , $ colorOrStatus = null , $ toolTipLabel = null ) { switch ( true ) { case ! isset ( $ this -> list [ $ this -> listCount - 1 ] ) : Checkers :: notice ( 'Unable to put badge [' . $ label . '] in list group, no element.' ) ; break ; case $ this -> list [ $ this -> listCount - 1 ] instanceof Button : Checkers :: notice ( 'Unable to badge a list group button. Use an element instead.' ) ; break ; case is_array ( $ this -> list [ $ this -> listCount - 1 ] ) : $ this -> badges [ $ this -> listCount - 1 ] [ ] = $ this -> getBadgeHtml ( $ label , $ colorOrStatus , $ toolTipLabel ) ; break ; default : Checkers :: notice ( 'Unable to find what to do with your badge [' . $ label . ']...' ) ; } return $ this ; }
Add a badge to current item
@param string $label
@param string $colorOrStatus
@param string $toolTipLabel
@return $this
Add a badge to current item