protected static function bar($width = 0, $htmlOptions = array())
{
self::addCssClass('progress-bar', $htmlOptions);
$color = TbArray::popValue('color', $htmlOptions);
if (!empty($color)) {
self::addCssClass('progress-bar-' . $color, $htmlOptions);
}
if ($width < 0) {
$width = 0;
}
if ($width > 100) {
$width = 100;
}
if ($width > 0) {
$width .= '%';
}
self::addCssStyle("width: {$width};", $htmlOptions);
$content = TbArray::popValue('content', $htmlOptions, '');
return self::tag('div', $htmlOptions, $content);
}