Static Public Member Functions |
static | getInstance () |
| Factory.
|
Protected Member Functions |
| __construct () |
| Constructor.
|
| setType ($a_value) |
| Set type (currently unwanted)
|
Detailed Description
Definition at line 11 of file class.ilProgressBar.php.
Constructor & Destructor Documentation
ilProgressBar::__construct |
( |
| ) |
|
|
protected |
Member Function Documentation
static ilProgressBar::getInstance |
( |
| ) |
|
|
static |
ilProgressBar::render |
( |
| ) |
|
Render.
- Returns
- string
Definition at line 155 of file class.ilProgressBar.php.
References $tpl.
{
$tpl =
new ilTemplate(
"tpl.il_progress.html",
true,
true,
"Services/UIComponent/ProgressBar");
$tpl->setVariable(
"MIN", $this->min);
$tpl->setVariable(
"MAX", $this->max);
$tpl->setVariable(
"CURRENT_INT", round($this->current));
$tpl->setVariable(
"CURRENT", round($this->current));
$tpl->setVariable(
"CAPTION", $this->caption);
$map = array(
self::TYPE_INFO => "info"
,self::TYPE_SUCCESS => "success"
,self::TYPE_WARNING => "warning"
,self::TYPE_DANGER => "danger"
);
$css = array("progress-bar-".$map[$this->type]);
if($this->striped)
{
$css[] = "progress-bar-striped";
}
if($this->animated)
{
$css[] = "active";
}
$tpl->setVariable(
"CSS", implode(
" ", $css));
if(!$this->show_caption)
{
$tpl->touchBlock(
"hide_caption_in_bl");
$tpl->touchBlock(
"hide_caption_out_bl");
}
}
ilProgressBar::setAnimated |
( |
|
$a_value | ) |
|
ilProgressBar::setCaption |
( |
|
$a_value | ) |
|
ilProgressBar::setCurrent |
( |
|
$a_value | ) |
|
ilProgressBar::setMax |
( |
|
$a_value | ) |
|
ilProgressBar::setMin |
( |
|
$a_value | ) |
|
ilProgressBar::setShowCaption |
( |
|
$a_value | ) |
|
ilProgressBar::setStriped |
( |
|
$a_value | ) |
|
ilProgressBar::setType |
( |
|
$a_value | ) |
|
|
protected |
Set type (currently unwanted)
- Parameters
-
Definition at line 61 of file class.ilProgressBar.php.
References $valid.
Referenced by __construct().
{
self::TYPE_INFO
,self::TYPE_SUCCESS
,self::TYPE_WARNING
,self::TYPE_DANGER
);
if(in_array($a_value,
$valid))
{
$this->type = $a_value;
}
}
Field Documentation
ilProgressBar::$show_caption |
|
protected |
const ilProgressBar::TYPE_DANGER = 4 |
const ilProgressBar::TYPE_INFO = 1 |
const ilProgressBar::TYPE_SUCCESS = 2 |
const ilProgressBar::TYPE_WARNING = 3 |
The documentation for this class was generated from the following file: