37 $this->
setType(self::TYPE_INFO);
69 if(in_array($a_value,
$valid))
71 $this->type = $a_value;
82 $this->min = abs((
int)$a_value);
92 $this->max = abs((
int)$a_value);
102 $this->caption = trim($a_value);
112 $this->show_caption = (bool)$a_value;
122 $this->striped = (bool)$a_value;
132 $this->animated = (bool)$a_value;
142 $this->current = abs($a_value);
157 $tpl =
new ilTemplate(
"tpl.il_progress.html",
true,
true,
"Services/UIComponent/ProgressBar");
159 $tpl->setVariable(
"MIN", $this->min);
160 $tpl->setVariable(
"MAX", $this->max);
161 $tpl->setVariable(
"CURRENT_INT", round($this->current));
162 $tpl->setVariable(
"CURRENT", round($this->current));
163 $tpl->setVariable(
"CAPTION", $this->caption);
166 self::TYPE_INFO =>
"info"
167 ,self::TYPE_SUCCESS =>
"success"
168 ,self::TYPE_WARNING =>
"warning"
169 ,self::TYPE_DANGER =>
"danger"
171 $css = array(
"progress-bar-".$map[$this->type]);
175 $css[] =
"progress-bar-striped";
183 $tpl->setVariable(
"CSS", implode(
" ", $css));
185 if(!$this->show_caption)
187 $tpl->touchBlock(
"hide_caption_in_bl");
188 $tpl->touchBlock(
"hide_caption_out_bl");