\Kendo\UI\ResponsivePanel
A PHP wrapper for Kendo UI ResponsivePanel.
Inherits from \Kendo\UI\Widget.
Usage
To use ResponsivePanel 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 ResponsivePanel
<?php
// Create a new instance of ResponsivePanel and specify its id
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
// Configure it
$responsivePanel->autoClose(true)
// Output it
echo $responsivePanel->render();
?>
Methods
autoClose
If set to false the widget will not close when the page content is touched, after it was opened on a mobile device. You will need to call the close method when the panel needs to close.
Returns
\Kendo\UI\ResponsivePanel
Parameters
$value boolean
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->autoClose(true);
?>
breakpoint
Specifies the page width at which the widget will be hidden and its toggle button will become visible.
Returns
\Kendo\UI\ResponsivePanel
Parameters
$value float
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->breakpoint(1);
?>
close
Triggered before the responsive panel is closed. Cancellable. For additional information check the close event documentation.
Returns
\Kendo\UI\ResponsivePanel
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->close('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onClose(e) {
// handle the close event.
}
</script>
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->close('onClose');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
content
Sets the HTML content of the ResponsivePanel.
Returns
ResponsivePanel
$value string
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->content('<strong>Content</strong>');
?>
endContent
Stops output bufferring and sets the preceding markup as the content of the ResponsivePanel.
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->startContent();
?>
<strong>Content</strong>
<?php
$responsivePanel->endContent(); // content is set to <strong>Content</strong>
?>
open
Triggered before the responsive panel is opened. Cancellable. For additional information check the open event documentation.
Returns
\Kendo\UI\ResponsivePanel
Parameters
$value string|\Kendo\JavaScriptFunction
Example - using string which defines a JavaScript function
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->open('function(e) { }');
?>
Example - using string which defines a JavaScript name
<script>
function onOpen(e) {
// handle the open event.
}
</script>
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->open('onOpen');
?>
Example - using \Kendo\JavaScriptFunction
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>
orientation
Specifies the direction from which the hidden element will open up, once the toggle button has been activated
Returns
\Kendo\UI\ResponsivePanel
Parameters
$value string
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->orientation('value');
?>
startContent
Starts output bufferring. Any following markup will be set as the content of the ResponsivePanel.
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->startContent();
?>
<strong>Content</strong>
<?php
$responsivePanel->endContent(); // content is set to <strong>Content</strong>
?>
toggleButton
Specifies the selector for the toggle button that will show and hide the responsive panel.
Returns
\Kendo\UI\ResponsivePanel
Parameters
$value string
Example
<?php
$responsivePanel = new \Kendo\UI\ResponsivePanel('ResponsivePanel');
$responsivePanel->toggleButton('value');
?>