This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Progress bar GUI
- Author
- Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Definition at line 23 of file class.ilProgressBar.php.
◆ __construct()
ilProgressBar::__construct |
( |
| ) |
|
|
protected |
◆ getInstance()
static ilProgressBar::getInstance |
( |
| ) |
|
|
static |
◆ render()
ilProgressBar::render |
( |
| ) |
|
Definition at line 125 of file class.ilProgressBar.php.
References $tpl, and ilUtil\getImagePath().
127 $tpl =
new ilTemplate(
"tpl.il_progress.html",
true,
true,
"Services/UIComponent/ProgressBar");
129 $tpl->setVariable(
"MIN", $this->min);
130 $tpl->setVariable(
"MAX", $this->max);
131 $tpl->setVariable(
"CURRENT_INT", round($this->current));
132 $tpl->setVariable(
"CURRENT", round($this->current));
133 $tpl->setVariable(
"CAPTION", $this->caption);
136 self::TYPE_INFO =>
"info" 137 ,self::TYPE_SUCCESS =>
"success" 138 ,self::TYPE_WARNING =>
"warning" 139 ,self::TYPE_DANGER =>
"danger" 141 $css = array(
"progress-bar-" . $map[$this->type]);
143 if ($this->striped) {
144 $css[] =
"progress-bar-striped";
147 if ($this->animated) {
151 $tpl->setVariable(
"CSS", implode(
" ", $css));
153 if (!$this->show_caption) {
154 $tpl->touchBlock(
"hide_caption_in_bl");
155 $tpl->touchBlock(
"hide_caption_out_bl");
158 if ($this->ajax_url !==
'' && $this->ajax_timeout) {
159 $this->main_tpl->addJavaScript(
"Services/UIComponent/ProgressBar/js/progress_bar.js");
160 $tpl->setCurrentBlock(
'async_status');
161 $tpl->setVariable(
'ASYNC_STATUS_ID', $this->unique_id);
163 $tpl->setVariable(
'AJAX_URL', $this->ajax_url);
164 $tpl->setVariable(
'AJAX_TIMEOUT', 1000 * $this->ajax_timeout);
165 $tpl->parseCurrentBlock();
168 $tpl->setVariable(
'PROGRESS_ID', $this->unique_id);
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
◆ setAnimated()
ilProgressBar::setAnimated |
( |
bool |
$a_value | ) |
|
◆ setAsyncStatusUrl()
ilProgressBar::setAsyncStatusUrl |
( |
string |
$a_target | ) |
|
◆ setAsynStatusTimeout()
ilProgressBar::setAsynStatusTimeout |
( |
int |
$a_timeout | ) |
|
◆ setCaption()
ilProgressBar::setCaption |
( |
string |
$a_value | ) |
|
◆ setCurrent()
ilProgressBar::setCurrent |
( |
float |
$a_value | ) |
|
◆ setId()
ilProgressBar::setId |
( |
string |
$a_id | ) |
|
◆ setMax()
ilProgressBar::setMax |
( |
int |
$a_value | ) |
|
◆ setMin()
ilProgressBar::setMin |
( |
int |
$a_value | ) |
|
◆ setShowCaption()
ilProgressBar::setShowCaption |
( |
bool |
$a_value | ) |
|
◆ setStriped()
ilProgressBar::setStriped |
( |
bool |
$a_value | ) |
|
◆ setType()
ilProgressBar::setType |
( |
int |
$a_value | ) |
|
◆ $ajax_timeout
int ilProgressBar::$ajax_timeout = 5 |
|
protected |
◆ $ajax_url
string ilProgressBar::$ajax_url = '' |
|
protected |
◆ $animated
bool ilProgressBar::$animated = false |
|
protected |
◆ $async_timeout
int ilProgressBar::$async_timeout = 0 |
|
protected |
◆ $caption
string ilProgressBar::$caption = "" |
|
protected |
◆ $current
int ilProgressBar::$current = 0 |
|
protected |
◆ $main_tpl
◆ $max
int ilProgressBar::$max = 0 |
|
protected |
◆ $min
int ilProgressBar::$min = 0 |
|
protected |
◆ $show_caption
bool ilProgressBar::$show_caption = false |
|
protected |
◆ $striped
bool ilProgressBar::$striped = false |
|
protected |
◆ $type
int ilProgressBar::$type = 0 |
|
protected |
◆ $unique_id
string ilProgressBar::$unique_id = '' |
|
protected |
◆ TYPE_DANGER
const ilProgressBar::TYPE_DANGER = 4 |
◆ TYPE_INFO
const ilProgressBar::TYPE_INFO = 1 |
◆ TYPE_SUCCESS
const ilProgressBar::TYPE_SUCCESS = 2 |
◆ TYPE_WARNING
const ilProgressBar::TYPE_WARNING = 3 |
The documentation for this class was generated from the following file: