\Kendo\UI\ExpansionPanel

A PHP wrapper for Kendo UI ExpansionPanel.

Inherits from \Kendo\UI\Widget.

Usage

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

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

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

// Output it

echo $expansionPanel->render();
?>

Methods

animation

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

Returns

\Kendo\UI\ExpansionPanel

Parameters

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

Example - using boolean

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

Example - using \Kendo\UI\ExpansionPanelAnimation

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$animation = new \Kendo\UI\ExpansionPanelAnimation();
$collapse = new \Kendo\UI\ExpansionPanelAnimationCollapse();
$animation->collapse($collapse);
$expansionPanel->animation($animation);
?>

Example - using array

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$collapse = new \Kendo\UI\ExpansionPanelAnimationCollapse();
$expansionPanel->animation(array('collapse' => $collapse));
?>

collapse

Fired when the widget is collapsed.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the collapse event documentation.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

collapseIconClass

The name of the collapse icon.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->collapseIconClass('value');
?>

complete

Fired when the animation during collapse/expand is completed.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the complete event documentation.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

disabled

If set to true the widget will be disabled.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value boolean

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->disabled(true);
?>

expand

Fired when the widget is expanded.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the expand event documentation.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

expandIconClass

The class of the expand icon.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->expandIconClass('value');
?>

expanded

If set to true the widget will be expanded by default.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value boolean

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->expanded(true);
?>

height

The height of the widget. Numeric values are treated as pixels.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value float|string

Example - using float

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->height(1);
?>

Example - using string

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->height('value');
?>

subTitle

The subtitle of the widget.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->subTitle('value');
?>

title

The title of the widget.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value string

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->title('value');
?>

toggleable

If set to false the user will not be able to expand/collapse the widget.

Returns

\Kendo\UI\ExpansionPanel

Parameters

$value boolean

Example

<?php
$expansionPanel = new \Kendo\UI\ExpansionPanel('ExpansionPanel');
$expansionPanel->toggleable(true);
?>
In this article
Not finding the help you need?