src/Common.php
public function progress($percent, $class = '', $display = false)
    {
        $html = '';
        $classes = (array) $class;
        foreach ((array) $percent as $key => $progress) {
            $class = (isset($classes[$key])) ? $classes[$key] : '';
            $class = $this->prefixClasses('progress-bar', array('success', 'info', 'warning', 'danger', 'striped'), $class);
            $html .= $this->page->tag('div', array(
                'class' => $class,
                'style' => 'width:'.$progress.'%;',
                'role' => 'progressbar',
                'aria-valuenow' => $progress,
                'aria-valuemin' => 0,
                'aria-valuemax' => 100,
            ), $display !== false ? $progress.'%' : '<span class="sr-only">'.$progress.'% Complete</span>');
        }

        return '<div class="progress">'.$html.'</div>';
    }
public function progress($percent, $class = '', $display = false)
    {
        $html = '';
        $classes = (array) $class;
        foreach ((array) $percent as $key => $progress) {
            $class = (isset($classes[$key])) ? $classes[$key] : '';
            $class = $this->prefixClasses('progress-bar', array('success', 'info', 'warning', 'danger', 'striped'), $class);
            $html .= $this->page->tag('div', array(
                'class' => $class,
                'style' => 'width:'.$progress.'%;',
                'role' => 'progressbar',
                'aria-valuenow' => $progress,
                'aria-valuemin' => 0,
                'aria-valuemax' => 100,
            ), $display !== false ? $progress.'%' : '<span class="sr-only">'.$progress.'% Complete</span>');
        }

        return '<div class="progress">'.$html.'</div>';
    }
public function progress ( $ percent , $ class = '' , $ display = false ) { $ html = '' ; $ classes = ( array ) $ class ; foreach ( ( array ) $ percent as $ key => $ progress ) { $ class = ( isset ( $ classes [ $ key ] ) ) ? $ classes [ $ key ] : '' ; $ class = $ this -> prefixClasses ( 'progress-bar' , array ( 'success' , 'info' , 'warning' , 'danger' , 'striped' ) , $ class ) ; $ html .= $ this -> page -> tag ( 'div' , array ( 'class' => $ class , 'style' => 'width:' . $ progress . '%;' , 'role' => 'progressbar' , 'aria-valuenow' => $ progress , 'aria-valuemin' => 0 , 'aria-valuemax' => 100 , ) , $ display !== false ? $ progress . '%' : '<span class="sr-only">' . $ progress . '% Complete</span>' ) ; } return '<div class="progress">' . $ html . '</div>' ; }
Creates every flavor of progress bar that Bootstrap has to offer.

@param int    $percent The amount of progress from 0 to 100. In order to stack multiple values then turn this into an array.
@param string $class   You can include one of the four contextual classes: '**success**', '**info**', '**warning**' or '**danger**'. Also '**striped**' and '**active**' if you like the looks of those. These will all be properly prefixed with '**progress-...**'. If you are stacking multiple bars, then turn this into an array and make sure your classes correspond with your percentages.
@param mixed  $display If anything but false, then the percentage will be displayed in the progress bar.

@return string

@example

```php
echo $bp->progress(60, 'info', 'display');

echo $bp->progress(array(25, 25, 25, 25), array('', 'warning', 'success', 'danger striped'));
```
Creates every flavor of progress bar that Bootstrap has to offer .