\Kendo\UI\ProgressBar

A PHP wrapper for Kendo UI ProgressBar.

Inherits from \Kendo\UI\Widget.

Usage

To use ProgressBar in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo ProgressBar

<?php
// Create a new instance of ProgressBar and specify its id
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');

// Configure it
$progressBar->chunkCount(1)

// Output it

echo $progressBar->render();
?>

Methods

animation

Configures the progress animation. Currently only the duration of the animation could be set.

Returns

\Kendo\UI\ProgressBar

Parameters

$value \Kendo\UI\ProgressBarAnimation |array

Example - using \Kendo\UI\ProgressBarAnimation

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$animation = new \Kendo\UI\ProgressBarAnimation();
$duration = 1;
$animation->duration($duration);
$progressBar->animation($animation);
?>

Example - using array

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$duration = 1;
$progressBar->animation(array('duration' => $duration));
?>

change

Fired when the value of the ProgressBar has changed. If the progress animation is enabled, the event will be fired after the animation has completed (does not applies to chunk ProgressBar). For additional information check the change event documentation.

Returns

\Kendo\UI\ProgressBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

chunkCount

Specifies the number of chunks.

Returns

\Kendo\UI\ProgressBar

Parameters

$value float

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->chunkCount(1);
?>

complete

Fired when the value of the ProgressBar reaches the maximum value. For additional information check the complete event documentation.

Returns

\Kendo\UI\ProgressBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->complete('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onComplete(e) {
        // handle the complete event.
    }
</script>
<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->complete('onComplete');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->complete(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

enable

If set to false the widget will be disabled. It will still allow changing the value. The widget is enabled by default.

Returns

\Kendo\UI\ProgressBar

Parameters

$value boolean

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->enable(true);
?>

max

The maximum value of the ProgressBar.

Returns

\Kendo\UI\ProgressBar

Parameters

$value float

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->max(1);
?>

min

The minimum value of the ProgressBar.

Returns

\Kendo\UI\ProgressBar

Parameters

$value float

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->min(1);
?>

orientation

The orientation of the ProgressBar. Possible values are horizontal and vertical.

Returns

\Kendo\UI\ProgressBar

Parameters

$value string

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->orientation('value');
?>

reverse

Specifies if the progress direction will be reversed.

Returns

\Kendo\UI\ProgressBar

Parameters

$value boolean

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->reverse(true);
?>

showStatus

Specifies if the progress status will be shown.

Returns

\Kendo\UI\ProgressBar

Parameters

$value boolean

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->showStatus(true);
?>

type

Specifies the type of the ProgressBar. The supported types are value, percent and chunk.

Returns

\Kendo\UI\ProgressBar

Parameters

$value string

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->type('value');
?>

value

The underlying value of the ProgressBar. It should be a number or false. Setting the value to false will set the state of the ProgressBar to indeterminate.

Returns

\Kendo\UI\ProgressBar

Parameters

$value float

Example

<?php
$progressBar = new \Kendo\UI\ProgressBar('ProgressBar');
$progressBar->value(1);
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy