42        $this->
setType(self::TYPE_INFO);
 
   74        if (in_array($a_value, 
$valid)) {
 
   75            $this->type = $a_value;
 
   86        $this->min = abs((
int) $a_value);
 
   96        $this->max = abs((
int) $a_value);
 
  106        $this->caption = trim($a_value);
 
  116        $this->show_caption = (bool) $a_value;
 
  126        $this->striped = (bool) $a_value;
 
  136        $this->animated = (bool) $a_value;
 
  146        $this->current = abs($a_value);
 
  151        $this->ajax_url = $a_target;
 
  156        $this->async_timeout = $a_timeout;
 
  161        $this->unique_id = $a_id;
 
  175        $tpl = 
new ilTemplate(
"tpl.il_progress.html", 
true, 
true, 
"Services/UIComponent/ProgressBar");
 
  177        $tpl->setVariable(
"MIN", $this->min);
 
  178        $tpl->setVariable(
"MAX", $this->max);
 
  179        $tpl->setVariable(
"CURRENT_INT", round($this->current));
 
  180        $tpl->setVariable(
"CURRENT", round($this->current));
 
  181        $tpl->setVariable(
"CAPTION", $this->caption);
 
  184            self::TYPE_INFO => 
"info" 
  185            ,self::TYPE_SUCCESS => 
"success" 
  186            ,self::TYPE_WARNING => 
"warning" 
  187            ,self::TYPE_DANGER => 
"danger" 
  189        $css = array(
"progress-bar-" . $map[$this->type]);
 
  191        if ($this->striped) {
 
  192            $css[] = 
"progress-bar-striped";
 
  195        if ($this->animated) {
 
  199        $tpl->setVariable(
"CSS", implode(
" ", $css));
 
  201        if (!$this->show_caption) {
 
  202            $tpl->touchBlock(
"hide_caption_in_bl");
 
  203            $tpl->touchBlock(
"hide_caption_out_bl");
 
  206        if (strlen($this->ajax_url) and $this->ajax_timeout) {
 
  207            $tpl->setCurrentBlock(
'async_status');
 
  208            $tpl->setVariable(
'ASYNC_STATUS_ID', $this->unique_id);
 
  210            $tpl->setVariable(
'AJAX_URL', $this->ajax_url);
 
  211            $tpl->setVariable(
'AJAX_TIMEOUT', 1000 * (
int) $this->ajax_timeout);
 
  212            $tpl->parseCurrentBlock();
 
  215        $tpl->setVariable(
'PROGRESS_ID', $this->unique_id);
 
An exception for terminatinating execution or to throw for unit testing.
setCaption($a_value)
Set Caption.
static getInstance()
Factory.
setMin($a_value)
Set minimum value.
setAsyncStatusUrl($a_target)
setType($a_value)
Set type (currently unwanted)
__construct()
Constructor.
setShowCaption($a_value)
Toggle show caption status.
setAsynStatusTimeout($a_timeout)
setCurrent($a_value)
Set current value.
setStriped($a_value)
Toggle striped layout.
setMax($a_value)
Set maximum value.
setAnimated($a_value)
Toggle animated layout.
special template class to simplify handling of ITX/PEAR
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)