\Kendo\UI\PanelBar

A PHP wrapper for Kendo UI PanelBar.

Inherits from \Kendo\UI\Widget.

Usage

To use PanelBar 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 PanelBar

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

// Configure it
$panelBar->animation(true)

// Output it

echo $panelBar->render();
?>

Methods

activate

Triggered when an item of a PanelBar is activated. For additional information check the activate event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->activate('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onActivate(e) {
        // handle the activate event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->activate('onActivate');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->activate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

animation

A collection of visual animations used when PanelBar items are expand or collapsed through user interactions. Setting this option to false will disable all animations. is not a valid configuration.

Returns

\Kendo\UI\PanelBar

Parameters

$value boolean |\Kendo\UI\PanelBarAnimation |array

Example - using boolean

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->animation(true);
?>

Example - using \Kendo\UI\PanelBarAnimation

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$animation = new \Kendo\UI\PanelBarAnimation();
$collapse = new \Kendo\UI\PanelBarAnimationCollapse();
$animation->collapse($collapse);
$panelBar->animation($animation);
?>

Example - using array

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$collapse = new \Kendo\UI\PanelBarAnimationCollapse();
$panelBar->animation(array('collapse' => $collapse));
?>

autoBind

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Returns

\Kendo\UI\PanelBar

Parameters

$value boolean

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->autoBind(true);
?>

collapse

Triggered when an item of a PanelBar is collapsed. For additional information check the collapse event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->collapse('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCollapse(e) {
        // handle the collapse event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->collapse('onCollapse');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->collapse(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

contentLoad

Fires when content is fetched from an AJAX request. For additional information check the contentLoad event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->contentLoad('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onContentLoad(e) {
        // handle the contentLoad event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->contentLoad('onContentLoad');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->contentLoad(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

contentUrls

Sets an array with the URLs from which the PanelBar items content to be loaded from. If only specific items should be loaded via Ajax, then you should set the URLs to the corresponding positions in the array and set the other elements to null.

Returns

\Kendo\UI\PanelBar

Parameters

$value array

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->contentUrls(array());
?>

dataBound

Triggered after the dataSource change event has been processed (adding/removing items); For additional information check the dataBound event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataBound('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBound(e) {
        // handle the dataBound event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataBound('onDataBound');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataBound(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataImageUrlField

Sets the field of the data item that provides the image URL of the PanelBar nodes.

Returns

\Kendo\UI\PanelBar

Parameters

$value string

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataImageUrlField('value');
?>

dataSource

Sets the data source of the widget.

Returns

\Kendo\UI\PanelBar

Parameters

$value \Kendo\Data\DataSource |array

Example - using \Kendo\Data\DataSource

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$dataSource = new \Kendo\Data\DataSource();
$panelBar->dataSource($dataSource);
?>

Example - using array

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$schema = new \Kendo\Data\DataSourceSchema();
$panelBar->dataSource(array('schema' => $schema));
?>

dataSpriteCssClassField

Sets the field of the data item that provides the sprite CSS class of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Returns

\Kendo\UI\PanelBar

Parameters

$value string

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataSpriteCssClassField('value');
?>

dataTextField

Sets the field of the data item that provides the text content of the nodes. If an array, each level uses the field that is at the same index in the array, or the last item in the array.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |array

Example - using string

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataTextField('value');
?>

Example - using array

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataTextField(array());
?>

dataUrlField

Sets the field of the data item that provides the link URL of the nodes.

Returns

\Kendo\UI\PanelBar

Parameters

$value string

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->dataUrlField('value');
?>

error

Fires when AJAX request results in an error. For additional information check the error event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->error('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onError(e) {
        // handle the error event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->error('onError');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->error(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

expand

Triggered when an item of a PanelBar is expanded. For additional information check the expand event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->expand('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onExpand(e) {
        // handle the expand event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->expand('onExpand');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->expand(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

expandMode

Specifies how the PanelBar items are displayed when opened and closed. The following values are available:

Returns

\Kendo\UI\PanelBar

Parameters

$value string

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->expandMode('value');
?>

addItem

Adds one or more PanelBarItem to the PanelBar.

Returns

\Kendo\UI\PanelBar

Parameters

$value[, $value2, ...] \Kendo\UI\PanelBarItem |array

Example - using \Kendo\UI\PanelBarItem

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$item = new \Kendo\UI\PanelBarItem();
$contentUrl = 'value';
$item->contentUrl($contentUrl);
$panelBar->addItem($item);
?>

Example - using array

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$contentUrl = 'value';
$panelBar->addItem(array('contentUrl' => $contentUrl));
?>

Example - adding more than one PanelBarItem

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$first  = new \Kendo\UI\PanelBarItem();
$second = new \Kendo\UI\PanelBarItem();
$panelBar->addItem($first, $second);
?>

loadOnDemand

Indicates whether the child DataSources should be fetched lazily when parent groups get expanded. Setting this to false causes all child DataSources to be loaded at initialization time.

Returns

\Kendo\UI\PanelBar

Parameters

$value boolean

Example

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->loadOnDemand(true);
?>

messages

The text messages displayed in the widget. Use it to customize or localize the messages.

Returns

\Kendo\UI\PanelBar

Parameters

$value \Kendo\UI\PanelBarMessages |array

Example - using \Kendo\UI\PanelBarMessages

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$messages = new \Kendo\UI\PanelBarMessages();
$loading = 'value';
$messages->loading($loading);
$panelBar->messages($messages);
?>

Example - using array

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$loading = 'value';
$panelBar->messages(array('loading' => $loading));
?>

select

Triggered when an item of a PanelBar is selected by the user. For additional information check the select event documentation.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->select('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSelect(e) {
        // handle the select event.
    }
</script>
<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->select('onSelect');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->select(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

template

Template for rendering each node.

Returns

\Kendo\UI\PanelBar

Parameters

$value string |\Kendo\JavaScriptFunction

Example - using string

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->template('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$panelBar = new \Kendo\UI\PanelBar('PanelBar');
$panelBar->template(new \Kendo\JavaScriptFunction('function() { }'));
?>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy