public static function stackedProgressBar(array $bars, $htmlOptions = array())
    {
        if (!empty($bars)) {
            self::addCssClass('progress', $htmlOptions);
            $output = self::openTag('div', $htmlOptions);
            $totalWidth = 0;
            foreach ($bars as $barOptions) {
                if (isset($barOptions['visible']) && !$barOptions['visible']) {
                    continue;
                }
                $width = TbArray::popValue('width', $barOptions, 0);
                $tmp = $totalWidth;
                $totalWidth += $width;
                if ($totalWidth > 100) {
                    $width = 100 - $tmp;
                }
                $output .= self::bar($width, $barOptions);
            }
            $output .= '</div>';
            return $output;
        }
        return '';
    }
public static function stackedProgressBar(array $bars, $htmlOptions = array())
    {
        if (!empty($bars)) {
            self::addCssClass('progress', $htmlOptions);
            $output = self::openTag('div', $htmlOptions);
            $totalWidth = 0;
            foreach ($bars as $barOptions) {
                if (isset($barOptions['visible']) && !$barOptions['visible']) {
                    continue;
                }
                $width = TbArray::popValue('width', $barOptions, 0);
                $tmp = $totalWidth;
                $totalWidth += $width;
                if ($totalWidth > 100) {
                    $width = 100 - $tmp;
                }
                $output .= self::bar($width, $barOptions);
            }
            $output .= '</div>';
            return $output;
        }
        return '';
    }
public static function stackedProgressBar ( array $ bars , $ htmlOptions = array ( ) ) { if ( ! empty ( $ bars ) ) { self :: addCssClass ( 'progress' , $ htmlOptions ) ; $ output = self :: openTag ( 'div' , $ htmlOptions ) ; $ totalWidth = 0 ; foreach ( $ bars as $ barOptions ) { if ( isset ( $ barOptions [ 'visible' ] ) && ! $ barOptions [ 'visible' ] ) { continue ; } $ width = TbArray :: popValue ( 'width' , $ barOptions , 0 ) ; $ tmp = $ totalWidth ; $ totalWidth += $ width ; if ( $ totalWidth > 100 ) { $ width = 100 - $ tmp ; } $ output .= self :: bar ( $ width , $ barOptions ) ; } $ output .= '</div>' ; return $ output ; } return '' ; }
Generates a stacked progress bar.
@param array $bars the bar configurations.
@param array $htmlOptions additional HTML attributes.
@return string the generated progress bar.
Generates a stacked progress bar .