Progress bar class.
More...
|
| __construct ($htmlid='', $width=500, $autostart=false) |
| Constructor.
|
|
| create () |
| Create a new progress bar, this function will output html.
|
|
| export_for_template (renderer_base $output) |
| Export for template.
|
|
| get_id () |
| Getter for ID.
|
|
| restart () |
| Restart the progress bar.
|
|
| update ($cur, $total, $msg) |
| Update progress bar according the number of tasks.
|
|
| update_full ($percent, $msg) |
| Update progress bar according percent.
|
|
Progress bar class.
Manages the display of a progress bar.
To use this class.
- construct
- call create (or use the 3rd param to the constructor)
- call update or update_full() or update() repeatedly
- Copyright
- 2008 jamiesensei
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
progress_bar::__construct |
( |
| $htmlid = '', |
|
|
| $width = 500, |
|
|
| $autostart = false ) |
Constructor.
Prints JS code if $autostart true.
- Parameters
-
string | $htmlid | The container ID. |
int | $width | The suggested width. |
bool | $autostart | Whether to start the progress bar right away. |
◆ create()
Create a new progress bar, this function will output html.
- Return values
-
◆ export_for_template()
Export for template.
- Parameters
-
- Return values
-
Implements templatable.
◆ get_id()
Getter for ID.
- Return values
-
◆ update()
progress_bar::update |
( |
| $cur, |
|
|
| $total, |
|
|
| $msg ) |
Update progress bar according the number of tasks.
- Parameters
-
int | $cur | Current task number. |
int | $total | Total task number. |
string | $msg | The message needed to be shown. |
◆ update_full()
progress_bar::update_full |
( |
| $percent, |
|
|
| $msg ) |
Update progress bar according percent.
- Parameters
-
int | $percent | From 1-100. |
string | $msg | The message needed to be shown. |
The documentation for this class was generated from the following file: