|
| __construct ($htmlid='', $width=500, $autostart=false) |
| Constructor.
|
|
| auto_update (bool $value) |
| Set whether or not to auto render updates to the screen.
|
|
| create () |
| Create a new progress bar, this function will output html.
|
|
| error (string $errormsg) |
| Set that the process running has errored.
|
|
| export_for_template (renderer_base $output) |
| Export for template.
|
|
| get_content () |
| Get the content to be rendered.
|
|
| get_estimate_message (float $percent) |
| This gets the estimate message to be displayed with the progress bar.
|
|
| get_haserrored () |
| Check if the process has errored.
|
|
| get_id () |
| Getter for ID.
|
|
| get_percent () |
| Get the percent.
|
|
| render () |
| Render the progress bar.
|
|
| 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.
|
|
|
| estimate ($pt) |
| Estimate how much time it is going to take.
|
|
| set_haserrored (bool $value) |
| Set the error flag on the object.
|
|
| update_raw ($percent, $msg) |
| Update the progress bar.
|
|
|
bool | $autoupdate = true |
| Whether or not to auto render updates to the screen.
|
|
bool | $haserrored = false |
| Whether or not an error has occured.
|
|
string | $idnumber |
| unique id
|
|
int | $lastupdate = 0 |
| time when last printed
|
|
int | $percent = 0 |
| last percentage printed
|
|
int | $timestart = 0 |
| when did we start printing this
|
|
int | $width |
| total width
|
|
|
static bool | $supportsoutputbuffering = false |
| Can use output buffering.
|
|
◆ __construct()
core\output\progress_bar::__construct |
( |
| $htmlid = '', |
|
|
| $width = 500, |
|
|
| $autostart = false ) |
Constructor.
Prints JS code if $autostart true.
- Parameters
-
string | $htmlid | The unique ID for the progress bar or HTML container id. |
int | $width | The suggested width. |
bool | $autostart | Whether to start the progress bar right away. |
◆ auto_update()
core\output\progress_bar::auto_update |
( |
bool | $value | ) |
|
Set whether or not to auto render updates to the screen.
- Parameters
-
- Return values
-
◆ create()
core\output\progress_bar::create |
( |
| ) |
|
◆ error()
core\output\progress_bar::error |
( |
string | $errormsg | ) |
|
◆ estimate()
core\output\progress_bar::estimate |
( |
| $pt | ) |
|
|
protected |
Estimate how much time it is going to take.
- Parameters
-
- Return values
-
mixed | Null (unknown), or int. |
◆ export_for_template()
core\output\progress_bar::export_for_template |
( |
renderer_base | $output | ) |
|
Export for template.
- Parameters
-
renderer_base | $output | The renderer. |
- Return values
-
Implements core\output\templatable.
◆ get_content()
core\output\progress_bar::get_content |
( |
| ) |
|
◆ get_estimate_message()
core\output\progress_bar::get_estimate_message |
( |
float | $percent | ) |
|
This gets the estimate message to be displayed with the progress bar.
- Parameters
-
- Return values
-
◆ get_haserrored()
core\output\progress_bar::get_haserrored |
( |
| ) |
|
Check if the process has errored.
- Return values
-
◆ get_id()
core\output\progress_bar::get_id |
( |
| ) |
|
Getter for ID.
- Return values
-
◆ get_percent()
core\output\progress_bar::get_percent |
( |
| ) |
|
Get the percent.
- Return values
-
◆ render()
core\output\progress_bar::render |
( |
| ) |
|
Render the progress bar.
- Return values
-
◆ set_haserrored()
core\output\progress_bar::set_haserrored |
( |
bool | $value | ) |
|
|
protected |
Set the error flag on the object.
- Parameters
-
- Return values
-
◆ update()
core\output\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()
core\output\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. |
◆ update_raw()
core\output\progress_bar::update_raw |
( |
| $percent, |
|
|
| $msg ) |
|
protected |
Update the progress bar.
- Parameters
-
int | $percent | From 1-100. |
string | $msg | The message. |
- Return values
-
- Exceptions
-
Reimplemented in core\output\stored_progress_bar.
The documentation for this class was generated from the following file:
- lib/classes/output/progress_bar.php