\Kendo\UI\ActionSheet

A PHP wrapper for Kendo UI ActionSheet.

Inherits from \Kendo\UI\Widget.

Usage

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

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

// Configure it
$actionSheet->adaptive(true)

// Output it

echo $actionSheet->render();
?>

Methods

addActionButton

Adds one or more ActionSheetActionButton to the ActionSheet.

Returns

\Kendo\UI\ActionSheet

Parameters

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

Example - using \Kendo\UI\ActionSheetActionButton

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionButton = new \Kendo\UI\ActionSheetActionButton();
$disabled = true;
$actionButton->disabled($disabled);
$actionSheet->addActionButton($actionButton);
?>

Example - using array

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$disabled = true;
$actionSheet->addActionButton(array('disabled' => $disabled));
?>

Example - adding more than one ActionSheetActionButton

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$first  = new \Kendo\UI\ActionSheetActionButton();
$second = new \Kendo\UI\ActionSheetActionButton();
$actionSheet->addActionButton($first, $second);
?>

activate

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

Returns

\Kendo\UI\ActionSheet

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

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

Example - using string which defines a JavaScript name

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

Example - using \Kendo\JavaScriptFunction

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

adaptive

When the ActionSheet is adaptive, it occupies the full width of the screen and has the option to cover the entire screen if the fullscreen is set to true as well.

Returns

\Kendo\UI\ActionSheet

Parameters

$value boolean

Example

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->adaptive(true);
?>

close

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

Returns

\Kendo\UI\ActionSheet

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->close('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onClose(e) {
        // handle the close event.
    }
</script>
<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->close('onClose');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->close(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

closeButton

Whether a close button would be rendered in the titlebar. A title needs to be set to get the titlebar rendered.

Returns

\Kendo\UI\ActionSheet

Parameters

$value boolean

Example

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->closeButton(true);
?>

contentTemplate

The text or the function whose result will be shown within the ActionSheet. By default, the ActionSheet will display the content of the target element. The content template will be disregarded if there are items defined in the widget options.

Returns

\Kendo\UI\ActionSheet

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->contentTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->contentTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

deactivate

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

Returns

\Kendo\UI\ActionSheet

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->deactivate('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDeactivate(e) {
        // handle the deactivate event.
    }
</script>
<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->deactivate('onDeactivate');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->deactivate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

footerTemplate

The text or the function whose result will be shown within the footer of the ActionSheet. The footer template will be disregarded if there are actionButtons defined in the widget options.

Returns

\Kendo\UI\ActionSheet

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->footerTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->footerTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

fullscreen

Specifies whether the adaptive actionsheet would cover the entire screen when opened.

Returns

\Kendo\UI\ActionSheet

Parameters

$value boolean

Example

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->fullscreen(true);
?>

addItem

Adds one or more ActionSheetItem to the ActionSheet.

Returns

\Kendo\UI\ActionSheet

Parameters

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

Example - using \Kendo\UI\ActionSheetItem

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$item = new \Kendo\UI\ActionSheetItem();
$description = 'value';
$item->description($description);
$actionSheet->addItem($item);
?>

Example - using array

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$description = 'value';
$actionSheet->addItem(array('description' => $description));
?>

Example - adding more than one ActionSheetItem

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$first  = new \Kendo\UI\ActionSheetItem();
$second = new \Kendo\UI\ActionSheetItem();
$actionSheet->addItem($first, $second);
?>

open

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

Returns

\Kendo\UI\ActionSheet

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->open('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onOpen(e) {
        // handle the open event.
    }
</script>
<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->open('onOpen');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->open(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

subtitle

Specifies the subtitle of the component. Requires the title to be configured in order to have the titlebar rendered.

Returns

\Kendo\UI\ActionSheet

Parameters

$value string

Example

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->subtitle('value');
?>

title

Specifies the title of the component

Returns

\Kendo\UI\ActionSheet

Parameters

$value string

Example

<?php
$actionSheet = new \Kendo\UI\ActionSheet('ActionSheet');
$actionSheet->title('value');
?>
In this article
Not finding the help you need?