42 $this->
setType(self::TYPE_INFO);
74 if(in_array($a_value,
$valid))
76 $this->type = $a_value;
87 $this->min = abs((
int)$a_value);
97 $this->max = abs((
int)$a_value);
107 $this->caption = trim($a_value);
117 $this->show_caption = (bool)$a_value;
127 $this->striped = (bool)$a_value;
137 $this->animated = (bool)$a_value;
147 $this->current = abs($a_value);
152 $this->ajax_url = $a_target;
157 $this->async_timeout = $a_timeout;
162 $this->unique_id = $a_id;
176 $tpl =
new ilTemplate(
"tpl.il_progress.html",
true,
true,
"Services/UIComponent/ProgressBar");
178 $tpl->setVariable(
"MIN", $this->min);
179 $tpl->setVariable(
"MAX", $this->max);
180 $tpl->setVariable(
"CURRENT_INT", round($this->current));
181 $tpl->setVariable(
"CURRENT", round($this->current));
182 $tpl->setVariable(
"CAPTION", $this->caption);
185 self::TYPE_INFO =>
"info" 186 ,self::TYPE_SUCCESS =>
"success" 188 ,self::TYPE_DANGER =>
"danger" 190 $css =
array(
"progress-bar-".$map[$this->type]);
194 $css[] =
"progress-bar-striped";
202 $tpl->setVariable(
"CSS", implode(
" ", $css));
204 if(!$this->show_caption)
206 $tpl->touchBlock(
"hide_caption_in_bl");
207 $tpl->touchBlock(
"hide_caption_out_bl");
210 if(strlen($this->ajax_url)
and $this->ajax_timeout)
212 $tpl->setCurrentBlock(
'async_status');
213 $tpl->setVariable(
'ASYNC_STATUS_ID',$this->unique_id);
215 $tpl->setVariable(
'AJAX_URL',$this->ajax_url);
216 $tpl->setVariable(
'AJAX_TIMEOUT',1000 * (
int) $this->ajax_timeout);
217 $tpl->parseCurrentBlock();
220 $tpl->setVariable(
'PROGRESS_ID',$this->unique_id);
setCaption($a_value)
Set Caption.
setAsyncStatusUrl($a_target)
setShowCaption($a_value)
Toggle show caption status.
setMax($a_value)
Set maximum value.
static getInstance()
Factory.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
__construct()
Constructor.
special template class to simplify handling of ITX/PEAR
setMin($a_value)
Set minimum value.
setStriped($a_value)
Toggle striped layout.
Create styles array
The data for the language used.
setAnimated($a_value)
Toggle animated layout.
setType($a_value)
Set type (currently unwanted)
setAsynStatusTimeout($a_timeout)
setCurrent($a_value)
Set current value.